[PATCH] D52286: [Intrinsic] Signed Saturation Intirnsic

2018-09-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 166756. leonardchan added a reviewer: rjmccall. leonardchan changed the repository for this revision from rC Clang to rL LLVM. Repository: rL LLVM https://reviews.llvm.org/D52286 Files: include/llvm/CodeGen/ISDOpcodes.h include/llvm/IR/Intrinsics.t

[PATCH] D52286: [Intrinsic] Signed Saturation Intirnsic

2018-09-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Of the intrinsics we plan to implement, it seems that the ordering of legalization affects specifically the fixed point mul/div intrinsics since if they get expanded into other nodes, we will need to check again for legal types since performing scaled mul/div requir

[PATCH] D52286: [Intrinsic] Signed Saturation Intirnsic

2018-09-25 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1119 + case ISD::SSAT: +// Target legalization checked here? +Action = TargetLowering::Expand; ebevhan wrote: > leonardchan wrote: > > ebevhan wrote: > > > leonardcha

[PATCH] D52814: [PassManager/Sanitizer] Enable usage of ported AddressSanitizer passes with -fsanitize=address

2018-10-02 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: mcgrathr, phosek, fedor.sergeev, philip.pfaffe, vitalybuka. leonardchan added projects: clang, Sanitizers. leonardchan added a dependency: D52739: [PassManager/Sanitizer] Port of AddresSanitizer pass from legacy to new PassManager.

[PATCH] D52847: [clang-doc] Handle anonymous namespaces

2018-10-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang-tools-extra/clang-doc/Representation.cpp:193-216 +llvm::SmallString<16> Info::extractFileName() { + switch (IT) { + case InfoType::IT_namespace: +// The case of anonymous namespaces is taken care of in serialization, so +

[PATCH] D52386: [Lexer] Add udefined_behavior_sanitizer feature

2018-10-03 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In https://reviews.llvm.org/D52386#1254437, @rsmith wrote: > I'm not at all convinced that this is a good thing. There isn't such a thing > as "undefined behavior sanitizer". Rather, there are a whole bunch of > different checks that fall under the same umbrella. Th

[PATCH] D52814: [PassManager/Sanitizer] Enable usage of ported AddressSanitizer passes with -fsanitize=address

2018-10-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In https://reviews.llvm.org/D52814#1254901, @philip.pfaffe wrote: > Is this the right place in the pipeline to put the passes? The legacy PM > inserts the asan passes at EP_OptimizerLast, why not do the same thing? I noticed this also and thought adding this using

[PATCH] D52814: [PassManager/Sanitizer] Enable usage of ported AddressSanitizer passes with -fsanitize=address

2018-10-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 168348. leonardchan marked an inline comment as done. Repository: rC Clang https://reviews.llvm.org/D52814 Files: lib/CodeGen/BackendUtil.cpp test/CodeGen/asan-new-pm.ll Index: test/CodeGen/asan-new-pm.ll =

[PATCH] D52386: [Lexer] Add udefined_behavior_sanitizer feature

2018-10-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. > This sounds like something that would be better handled in the build system > rather than in source code. In particular, I think you don't actually want to > detect "is this translation unit being compiled with ubsan enabled?", you > instead want to detect "is the

[PATCH] D57219: [Fixed Point Arithmetic] Fixed Point Comparisons

2019-01-31 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 184612. leonardchan marked 3 inline comments as done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57219/new/ https://reviews.llvm.org/D57219 Files: clang/lib/AST/ExprConstant.cpp clang/lib/CodeGen/CGExprScalar.cpp

[PATCH] D57219: [Fixed Point Arithmetic] Fixed Point Comparisons

2019-01-31 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3444 case BO_NE: +return Builder.CreateICmpNE(FullLHS, FullRHS); + case BO_Mul: rjmccall wrote: > Are padding bits guaranteed zero or unspecified? Or are we just not really

[PATCH] D57553: [Fixed Point Arithmetic] Check against source value when converting during saturation

2019-01-31 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: rjmccall, ebevhan, bjope. leonardchan added a project: clang. When converting to a saturating fixed point type, compare against the source value instead of our container value. This allows us to not create a container, and save up t

[PATCH] D56900: [Fixed Point Arithmetic] Fixed Point and Integer Conversions

2019-01-31 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added inline comments. Comment at: clang/test/Frontend/fixed_point_conversions.c:437 + // DEFAULT-NEXT: [[RES:%[a-z0-9]+]] = trunc i39 [[SATMIN]] to i16 + // DEFAULT-NEXT: store i16 [[RES]], i16* %sat_sa, align 2 + -

[PATCH] D57219: [Fixed Point Arithmetic] Fixed Point Comparisons

2019-02-01 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 184886. leonardchan marked an inline comment as done. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57219/new/ https://reviews.llvm.org/D57219 Files: clang/lib/AST/ExprConstant.cpp clang/lib/CodeGen/CGExprScalar.cpp

[PATCH] D57219: [Fixed Point Arithmetic] Fixed Point Comparisons

2019-02-01 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:3444 case BO_NE: +return Builder.CreateICmpNE(FullLHS, FullRHS); + case BO_Mul: rjmccall wrote: > leonardchan wrote: > > rjmccall wrote: > > > Are padding bits guaranteed ze

[PATCH] D57553: [Fixed Point Arithmetic] Avoid resizing for types with the same width

2019-02-01 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 184888. leonardchan retitled this revision from "[Fixed Point Arithmetic] Check against source value when converting during saturation" to "[Fixed Point Arithmetic] Avoid resizing for types with the same width". leonardchan edited the summary of this revi

[PATCH] D57553: [Fixed Point Arithmetic] Avoid resizing for types with the same width

2019-02-01 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D57553#1380157 , @ebevhan wrote: > This doesn't seem to address the particular case in the integer conversion > patch. In fact, I don't see those conversions at all. I was initially planning on rebasing and updating the p

[PATCH] D57553: [Fixed Point Arithmetic] Avoid resizing for types with the same width

2019-02-07 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan abandoned this revision. leonardchan marked an inline comment as done. leonardchan added a comment. In D57553#1388493 , @ebevhan wrote: > In D57553#1381920 , @leonardchan > wrote: > > > In regards to so

[PATCH] D56470: [NewPM] Second attempt at porting ASan

2019-02-13 Thread Leonard Chan via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC353985: [NewPM] Second attempt at porting ASan (authored by leonardchan, committed by ). Herald added a project: clang. He

[PATCH] D58214: [CMake][Fuchsia] Enable experimental pass manager by default

2019-02-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan accepted this revision. leonardchan added a comment. This revision is now accepted and ready to land. LGTM. Doesn't seem to break anything as far as I can see. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58214/new/ https://reviews.llvm.org/D58214

[PATCH] D58321: [WIP] Support for relative vtables

2019-02-15 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. Herald added subscribers: cfe-commits, jdoerfert. Herald added a project: clang. This is a revisit to D20749 which introduces a flag that enables the relative ABI described in https://bugs.llvm.org/show_bug.cgi?id=26723. Repo

[PATCH] D58424: [NewPM] Add other sanitizers at O0

2019-02-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: chandlerc, philip.pfaffe, fedor.sergeev. leonardchan added a project: clang. This allows for MSan and TSan to be used without optimizations required. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D58424 Files: c

[PATCH] D58424: [NewPM] Add other sanitizers at O0

2019-02-19 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354431: [NewPM] Add other sanitizers at O0 (authored by leonardchan, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.

[PATCH] D56900: [Fixed Point Arithmetic] Fixed Point and Integer Conversions

2019-02-20 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 187706. leonardchan marked an inline comment as done. Herald added a subscriber: jdoerfert. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D56900/new/ https://reviews.llvm.org/D56900 Files: clang/include/clang/AST/Operatio

[PATCH] D56900: [Fixed Point Arithmetic] Fixed Point and Integer Conversions

2019-02-20 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/test/Frontend/fixed_point_conversions.c:437 + // DEFAULT-NEXT: [[RES:%[a-z0-9]+]] = trunc i39 [[SATMIN]] to i16 + // DEFAULT-NEXT: store i16 [[RES]], i16* %sat_sa, align 2 + ebevhan wrote: > leonardchan wrote

[PATCH] D56900: [Fixed Point Arithmetic] Fixed Point and Integer Conversions

2019-02-20 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added inline comments. Comment at: clang/test/Frontend/fixed_point_conversions.c:437 + // DEFAULT-NEXT: [[RES:%[a-z0-9]+]] = trunc i39 [[SATMIN]] to i16 + // DEFAULT-NEXT: store i16 [[RES]], i16* %sat_sa, align 2 + -

[PATCH] D57219: [Fixed Point Arithmetic] Fixed Point Comparisons

2019-02-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a subscriber: bevinh. leonardchan added a comment. Herald added a subscriber: jdoerfert. *ping* @bevinh @rjmccall @bjope Any other comments on this patch? Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57219/new/ https://reviews.llvm.org/D57219

[PATCH] D57219: [Fixed Point Arithmetic] Fixed Point Comparisons

2019-02-21 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC354621: [Fixed Point Arithmetic] Fixed Point Comparisons (authored by leonardchan, committed by ). Changed prior to commit: https://reviews.llvm.org/D57219?vs=184886&id=187847#toc Repository: rC Clan

[PATCH] D57226: [Fixed Point] [AST] Add an AST serialization code for fixed-point literals.

2019-02-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan accepted this revision. leonardchan added a comment. This revision is now accepted and ready to land. Herald added a project: clang. LGTM. Everything still seems to work on my end after applying this diff. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D20749: Introduce support for relative C++ ABI gated on LTO visibility.

2019-02-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Herald added a subscriber: jdoerfert. Hi @pcc , I'm working on revisiting this to see if this could help when building Fuchsia (D58321 ) and had a few questions I left inline. Comment at: lib/CodeGen/CGVTables.cpp:

[PATCH] D62888: [NewPM] Port Sancov

2019-06-04 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: fedor.sergeev, philip.pfaffe, chandlerc. leonardchan added a project: clang. Herald added subscribers: hiraditya, eraman. Herald added a project: LLVM. This patch contains a port of SanitizerCoverage to the new pass manager. This one

[PATCH] D62225: [clang][NewPM] Fixing -O0 tests that are broken under new PM

2019-06-05 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D62225#1519394 , @efriedma wrote: > Are the behavior differences between the newpm alwaysinliner and the oldpm > alwaysinliner intentional? Specifically, the differences in pass remarks, > and the differences in the treat

[PATCH] D62888: [NewPM] Port Sancov

2019-06-10 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *ping* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62888/new/ https://reviews.llvm.org/D62888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D63153: [clang][NewPM] Fix broken -O0 test from the AlwaysInliner

2019-06-11 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: chandlerc, echristo, phosek, serge-sans-paille. leonardchan added a project: clang. Herald added subscribers: kristof.beyls, javed.absar. This contains the part of D62225 which prevents insertion of

[PATCH] D63155: [clang][NewPM] Fix broken profile test

2019-06-11 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: chandlerc, echristo, phosek, serge-sans-paille. leonardchan added a project: clang. leonardchan added a parent revision: D62225: [clang][NewPM] Fixing -O0 tests that are broken under new PM. This contains the part of D62225

[PATCH] D63156: [clang][NewPM] Add -fno-experimental-new-pass-manager to tests

2019-06-11 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: chandlerc, echristo, phosek, serge-sans-paille. leonardchan added a project: clang. Herald added subscribers: dexonsmith, steven_wu, javed.absar, mehdi_amini. As per the discussion on D58375 , we disab

[PATCH] D63168: [clang][NewPM] Fix

2019-06-11 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: chandlerc, echristo, phosek, serge-sans-paille. leonardchan added a project: clang. Herald added a subscriber: aprantl. This contains the part of D62225 which fixes CodeGen/split-debug-single-file.c

[PATCH] D63170: [clang][NewPM] Fix broken -O0 test from missing assumptions

2019-06-11 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: chandlerc, echristo, phosek, serge-sans-paille. leonardchan added a project: clang. Herald added subscribers: llvm-commits, hiraditya, eraman. Herald added a project: LLVM. leonardchan added a parent revision: D62225: [clang][NewPM] Fi

[PATCH] D63170: [clang][NewPM] Fix broken -O0 test from missing assumptions

2019-06-11 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 204174. Herald added subscribers: dexonsmith, steven_wu, mehdi_amini. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63170/new/ https://reviews.llvm.org/D63170 Files: clang/test/CodeGen/lto-newpm-pipeline.c

[PATCH] D63174: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM

2019-06-11 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: chandlerc, echristo, phosek, serge-sans-paille. leonardchan added a project: clang. Herald added subscribers: dmgreen, Anastasia. With the new pass manager enabled by default, some tests produce slightly different IR from the legacy

[PATCH] D62225: [clang][NewPM] Fixing remaining -O0 tests that are broken under new PM

2019-06-11 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 204198. leonardchan retitled this revision from "[clang][NewPM] Fixing -O0 tests that are broken under new PM" to "[clang][NewPM] Fixing remaining -O0 tests that are broken under new PM". leonardchan edited the summary of this revision. Repository: rG

[PATCH] D62225: [clang][NewPM] Fixing remaining -O0 tests that are broken under new PM

2019-06-11 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D62225#1537248 , @chandlerc wrote: > I think this ultimately needs to be split up into smaller patches. A bunch of > these things can be landed independently. Here is my first cut at things to > split out, each one into it

[PATCH] D62888: [NewPM] Port Sancov

2019-06-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D62888#1537233 , @chandlerc wrote: > I would just change this to have the module pass loop over the functions -- > that seems like it'll be much cleaner. > > As it is, I'm not seeing where the loop actually happens. But rat

[PATCH] D62888: [NewPM] Port Sancov

2019-06-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 204333. leonardchan edited the summary of this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62888/new/ https://reviews.llvm.org/D62888 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeG

[PATCH] D63153: [clang][NewPM] Fix broken -O0 test from the AlwaysInliner

2019-06-13 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363277: [clang][NewPM] Fix broken -O0 test from the AlwaysInliner (authored by leonardchan, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D63153: [clang][NewPM] Fix broken -O0 test from the AlwaysInliner

2019-06-13 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D63153#1540920 , @chandlerc wrote: > Code change LGTM. Can you update at least one of the tests to explicitly run > both PMs so that we'll notice if this breaks in some weird way? Feel free to > submit with that change.

[PATCH] D63155: [clang][NewPM] Fix broken profile test

2019-06-13 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363278: [clang][NewPM] Fix broken profile test (authored by leonardchan, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.l

[PATCH] D63168: [clang][NewPM] Fix split debug test

2019-06-13 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363281: [clang][NewPM] Fix split debug test (authored by leonardchan, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm

[PATCH] D63170: [clang][NewPM] Fix broken -O0 test from missing assumptions

2019-06-13 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363287: [clang][NewPM] Fix broken -O0 test from missing assumptions (authored by leonardchan, committed by ). Changed prior to commit: https://reviews.llvm.org/D63170?vs=204174&id=204590#toc Repository

[PATCH] D63156: [clang][NewPM] Add -fno-experimental-new-pass-manager to tests

2019-06-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. I did some more digging and found the following differences between PMs for each test, and they seem to all differ and can be fixed for different reasons. **CodeGen/aggregate-assign-call.c**: The new PM on -O1 codegen produces the do/while loop differently but still

[PATCH] D63156: [clang][NewPM] Add -fno-experimental-new-pass-manager to tests

2019-06-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 204808. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63156/new/ https://reviews.llvm.org/D63156 Files: clang/lib/CodeGen/Ba

[PATCH] D63174: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM

2019-06-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63174/new/ https://reviews.llvm.org/D63174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[PATCH] D63174: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM

2019-06-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. For the avx tests, I don't suppose you know a simple way to generate these tests? They're about 10k lines long and it's taking a while to go through it by hand to replace the current IR checks with codegen for `-O1`. (Perhaps something along the lines of `utils/upd

[PATCH] D62888: [NewPM] Port Sancov

2019-06-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 204892. leonardchan marked 9 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62888/new/ https://reviews.llvm.org/D62888 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/

[PATCH] D62888: [NewPM] Port Sancov

2019-06-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:1231-1232 + MPM.addPass(ModuleSanitizerCoveragePass(SancovOpts)); + MPM.addPass( + createModuleToFunctionPassAdaptor(SanitizerCoveragePass(SancovOpts))); +} c

[PATCH] D63174: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM

2019-06-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 205496. leonardchan marked an inline comment as done. leonardchan added a reviewer: craig.topper. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63174/new/ https://reviews.llvm.org/D63174 Files: clang/test/

[PATCH] D63174: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM

2019-06-18 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. OK so I instead wrote a script that generated the tests for me since changing each individual case by hand was painful. All the `-cc1` tests now match, although I don't know any ways of simplifying the IR further to help reduce test size. I would definitely love to

[PATCH] D62225: [clang][NewPM] Fixing remaining -O0 tests that are broken under new PM

2019-06-19 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363846: [clang][NewPM] Fixing remaining -O0 tests that are broken under new PM (authored by leonardchan, committed by ). Changed prior to commit: https://reviews.llvm.org/D62225?vs=204198&id=205639#toc

[PATCH] D63577: [clang][NewPM] Move EntryExitInstrumenterPass to the start of the pipeline

2019-06-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: chandlerc, phosek, echristo, serge-sans-paille. leonardchan added a project: clang. This fixes `CodeGen/x86_64-instrument-functions.c` when running under the new pass manager. The pass should go before any other pass to prevent `__c

[PATCH] D63580: [clang][NewPM] Do not eliminate available_externally durng `-O2 -flto` runs

2019-06-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: chandlerc, phosek, echristo, serge-sans-paille. leonardchan added a project: clang. Herald added subscribers: llvm-commits, dexonsmith, steven_wu, hiraditya, inglorion, mehdi_amini. Herald added a project: LLVM. This fixes `CodeGen/a

[PATCH] D63174: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM

2019-06-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 205707. Herald added subscribers: dexonsmith, steven_wu, javed.absar, mehdi_amini. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63174/new/ https://reviews.llvm.org/D63174 Files: clang/test/CodeGen/aggrega

[PATCH] D63156: [clang][NewPM] Add -fno-experimental-new-pass-manager to tests

2019-06-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 205708. leonardchan marked 3 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63156/new/ https://reviews.llvm.org/D63156 Files: clang/test/CodeGen/aggregate-assign-call.c clang/test

[PATCH] D63156: [clang][NewPM] Add -fno-experimental-new-pass-manager to tests

2019-06-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. >> **CodeGen/pgo-sample.c [No new fix]**: The test checks that `PruneEH` runs, >> but there doesn’t seem to be a corresponding new PM pass for it. Should >> there be? If there is one then we can just check for that in the debug PM >> dump. > > The analog would be `

[PATCH] D63174: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM

2019-06-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 205722. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63174/new/ https://reviews.llvm.org/D63174 Files: clang/test/CodeGen/avx512-reduceMinMaxIntrin.c clang/test/CodeGen/avx512f-builtins.c clang/test/C

[PATCH] D63174: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM

2019-06-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D63174#1549601 , @chandlerc wrote: > OMG, I'm so sorry, I had no idea that the tests would explode like that... > Yeah, I don't think that's useful > > Maybe a better approach is to just explicitly run the code through

[PATCH] D63174: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM

2019-06-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 205727. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63174/new/ https://reviews.llvm.org/D63174 Files: clang/test/CodeGen/avx512-reduceMinMaxIntrin.c clang/test/CodeGen/avx512f-builtins.c clang/test/C

[PATCH] D63577: [clang][NewPM] Move EntryExitInstrumenterPass to the start of the pipeline

2019-06-20 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363969: [clang][NewPM] Move EntryExitInstrumenterPass to the start of the pipeline (authored by leonardchan, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed

[PATCH] D63580: [clang][NewPM] Do not eliminate available_externally durng `-O2 -flto` runs

2019-06-20 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. leonardchan marked an inline comment as done. Closed by commit rG97dc622ab3f7: [clang][NewPM] Do not eliminate available_externally durng `-O2 -flto` runs (authored by leonardchan). Changed prior to commit: https://review

[PATCH] D62888: [NewPM] Port Sancov

2019-07-11 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *ping* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62888/new/ https://reviews.llvm.org/D62888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D62888: [NewPM] Port Sancov

2019-07-11 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365838: [NewPM] Port Sancov (authored by leonardchan, committed by ). Changed prior to commit: https://reviews.llvm.org/D62888?vs=207698&id=209358#toc Repository: rL LLVM CHANGES SINCE LAST ACTION

[PATCH] D62888: [NewPM] Port Sancov

2019-07-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan marked an inline comment as done. leonardchan added inline comments. Comment at: llvm/trunk/lib/Transforms/Instrumentation/SanitizerCoverage.cpp:1022-1026 +SanitizerCoverage::getSectionStart(const std::string &Section) const { + return getSectionStartImpl(TargetTrip

[PATCH] D64843: hwasan: Initialize the pass only once.

2019-07-17 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added subscribers: fedor.sergeev, philip.pfaffe, leonardchan. leonardchan added a comment. cc: @fedor.sergeev @philip.pfaffe on this I think one of the things we want in the new PM is the data locality that we see from iterating only specific IR units (functions in this case). This w

[PATCH] D65110: [NewPM] Run avx*-builtins.c tests under the new pass manager only

2019-07-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: chandlerc, craig.topper, spatel, RKSimon. leonardchan added a project: clang. This patch changes the following tests to run under the new pass manager only: Clang :: CodeGen/avx512-reduceMinMaxIntrin.c (1 of 4) Clang :: CodeGen/a

[PATCH] D63638: [clang][NewPM] Add new pass manager RUN lines to avx512f-builtins.c

2019-07-22 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. I created D65110 if we're ok with just using the new PM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63638/new/ https://reviews.llvm.org/D63638 ___ cfe-commits mailing list c

[PATCH] D65110: [NewPM] Run avx*-builtins.c tests under the new pass manager only

2019-07-24 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 211572. leonardchan marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65110/new/ https://reviews.llvm.org/D65110 Files: clang/test/CodeGen/avx512-reduceMinMaxIntrin.c clang/

[PATCH] D65110: [NewPM] Run avx*-builtins.c tests under the new pass manager only

2019-07-26 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. *ping* Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65110/new/ https://reviews.llvm.org/D65110 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D65110: [NewPM] Run avx*-builtins.c tests under the new pass manager only

2019-07-26 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL367157: [NewPM] Run avx*-builtins.c tests under the new pass manager only (authored by leonardchan, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to

[PATCH] D63174: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM

2019-07-29 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan abandoned this revision. leonardchan added a comment. Replaced with D65110 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63174/new/ https://reviews.llvm.org/D63174 ___

[PATCH] D65300: [clang] [CodeGen] clang-misexpect prototype for compiler warnings

2019-07-30 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan accepted this revision. leonardchan added a comment. This revision is now accepted and ready to land. LGTM but I'd wait a day to see if anyone else has comments they'd like to add before landing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes

2019-08-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Hi. I noticed in our builders that both of the warnings introduced in this patch are being diagnosed for pointers that don't use GSL at all. I'm attempting to make a small reproducer now. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes

2019-08-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D64256#1626025 , @xazax.hun wrote: > In D64256#1625998 , @leonardchan > wrote: > > > Hi. I noticed in our builders that both of the warnings introduced in this > > patch are being d

[PATCH] D64256: Teach some warnings to respect gsl::Pointer and gsl::Owner attributes

2019-08-12 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D64256#1626329 , @xazax.hun wrote: > In D64256#1626279 , @leonardchan > wrote: > > > In D64256#1626025 , @xazax.hun > > wrote: > > > > > In

[PATCH] D63626: [clang][NewPM] Remove exception handling before loading pgo sample profile data

2019-06-20 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan created this revision. leonardchan added reviewers: chandlerc, phosek, serge-sans-paille, echristo. leonardchan added a project: clang. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. leonardchan added a parent revision: D63156: [clang][NewPM] Add -fno-

[PATCH] D63156: [clang][NewPM] Add -fno-experimental-new-pass-manager to tests

2019-06-20 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 205906. leonardchan marked 3 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63156/new/ https://reviews.llvm.org/D63156 Files: clang/test/CodeGen/aggregate-assign-call.c clang/test

[PATCH] D63156: [clang][NewPM] Add -fno-experimental-new-pass-manager to tests

2019-06-20 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/test/CodeGen/pgo-sample.c:12-14 +// NEWPM-DAG: PostOrderFunctionAttrsPass +// NEWPM-DAG: SimplifyCFGPass +// NEWPM-DAG: SampleProfileLoaderPass chandlerc wrote: > The DAG worries me a bit ... The point here is

[PATCH] D62888: [NewPM] Port Sancov

2019-06-20 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 205922. leonardchan marked 3 inline comments as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62888/new/ https://reviews.llvm.org/D62888 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/

[PATCH] D62888: [NewPM] Port Sancov

2019-06-20 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: clang/lib/CodeGen/BackendUtil.cpp:1231-1232 + MPM.addPass(ModuleSanitizerCoveragePass(SancovOpts)); + MPM.addPass( + createModuleToFunctionPassAdaptor(SanitizerCoveragePass(SancovOpts))); +} c

[PATCH] D63156: [clang][NewPM] Add -fno-experimental-new-pass-manager to tests

2019-06-21 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364066: [clang][NewPM] Add -fno-experimental-new-pass-manager to tests (authored by leonardchan, committed by ). Changed prior to commit: https://reviews.llvm.org/D63156?vs=205906&id=206013#toc Reposi

[PATCH] D63626: [clang][NewPM] Remove exception handling before loading pgo sample profile data

2019-06-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D63626#1553054 , @chandlerc wrote: > See inline comment, but I think we should just drop the testing of the > function attribute bit here rather than adjusting the pipeline. Ok. Removed the pipeline change for now. In D6

[PATCH] D63626: [clang][NewPM] Remove exception handling before loading pgo sample profile data

2019-06-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 206041. leonardchan marked an inline comment as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63626/new/ https://reviews.llvm.org/D63626 Files: clang/test/CodeGen/pgo-sample.c Index: clang/test/Cod

[PATCH] D63174: [clang][NewPM] Add RUNS for tests that produce slightly different IR under new PM

2019-06-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D63174#1553096 , @craig.topper wrote: > I'm going to try to work on the X86 tests. Can we hold off on committing > those? Ok. For now I'll just commit the convergent.cl test separately. Repository: rG LLVM Github Mon

[PATCH] D63626: [clang][NewPM] Remove exception handling before loading pgo sample profile data

2019-06-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added inline comments. Comment at: llvm/lib/Passes/PassBuilder.cpp:665-668 +// We must also remove exception handling before attaching sample profile +// data. +MPM.addPass( +createModuleToPostOrderCGSCCPassAdaptor(PostOrderFunctionAttrsPass())); -

[PATCH] D63626: [clang][NewPM] Remove exception handling before loading pgo sample profile data

2019-06-21 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 206065. leonardchan marked 2 inline comments as done. leonardchan edited the summary of this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63626/new/ https://reviews.llvm.org/D63626 Files: clang/

[PATCH] D63626: [clang][NewPM] Remove exception handling before loading pgo sample profile data

2019-06-24 Thread Leonard Chan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL364201: [clang][NewPM] Remove exception handling before loading pgo sample profile data (authored by leonardchan, committed by ). Changed prior to commit: https://reviews.llvm.org/D63626?vs=206065&id=20

[PATCH] D63638: [clang][NewPM] Add new pass manager RUN lines to avx512f-builtins.c

2019-06-26 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Any updates on this? I'm thinking that in the meantime maybe we could commit D63174 and work on this while that lands. If so, we could get an upstream new PM buildbot that can catch any new PM regressions. CHANGES SINCE LAST ACTIO

[PATCH] D63155: [clang][NewPM] Fix broken profile test

2019-06-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D63155#1563229 , @xur wrote: > This patch does not make sense to me. > > The reason of failing with -fexperimental-new-pass-manager is because we > don't do PGO instrumentation at -O0. This is due to the fact that PGO > in

[PATCH] D63155: [clang][NewPM] Fix broken profile test

2019-06-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. > I mean, I'm happy for the patch to be reverted, but I still really don't > understand why this fixes the test to work *exactly* the same as w/ the old > pass manager and doesn't break any other tests if it is completely wrong? It > seems like there must be somethi

[PATCH] D63155: [clang][NewPM] Fix broken profile test

2019-06-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Understood. I'll revert this patch. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63155/new/ https://reviews.llvm.org/D63155 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[PATCH] D63155: [clang][NewPM] Fix broken profile test

2019-06-28 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. Reverted in r364692 Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63155/new/ https://reviews.llvm.org/D63155 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D62888: [NewPM] Port Sancov

2019-07-01 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. ping @chandlerc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62888/new/ https://reviews.llvm.org/D62888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

<    1   2   3   4   5   6   7   8   9   >