summaryrefslogtreecommitdiff
path: root/test/LTO
AgeCommit message (Collapse)Author
2017-12-16[LTO] Make processing of combined module more consistentVitaly Buka
Summary: 1. Use stream 0 only for combined module. Previously if combined module was not processes ThinLTO used the stream for own output. However small changes in input, could trigger combined module and shuffle outputs making life of llvm::LTO harder. 2. Always process combined module and write output to stream 0. Processing empty combined module is cheap and allows llvm::LTO users to avoid implementing processing which is already done in llvm::LTO. Subscribers: mehdi_amini, inglorion, eraman, hiraditya Differential Revision: https://reviews.llvm.org/D41267 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320905 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-15[ThinLTO] Disallow multiple prevailing defsEugene Leviant
https://reviews.llvm.org/D41291 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320825 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-15[LLVMgold] Don't set undefined symbol as prevailingEugene Leviant
Differential revision: https://reviews.llvm.org/D41113 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320794 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-21Object: Improve COFF irsymtab comdat representation.Peter Collingbourne
Change the representation of COFF comdats so that a COFF linker is able to accurately resolve comdats between IR and native object files. Specifically, apply name mangling to comdat names consistently with native object files, and do not export comdats with an internal leader because they do not affect symbol resolution. Differential Revision: https://reviews.llvm.org/D40278 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318805 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-04[LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local.Sean Fertile
Now that we have a way to mark GlobalValues as local we can use the symbol resolutions that the linker plugin provides as part of lto/thinlto link step to refine the compilers view on what symbols will end up being local. Originally commited as r317374, but reverted in r317395 to update some missed tests. Differential Revision: https://reviews.llvm.org/D35702 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317408 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-04Revert "[LTO][ThinLTO] Use the linker resolutions to mark global values ..."Sean Fertile
Changes more tests then expected on one of the build bots. reverting to investigate. This reverts https://llvm.org/svn/llvm-project/llvm/trunk@317374 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317395 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-03[LTO][ThinLTO] Use the linker resolutions to mark global values as dso_local.Sean Fertile
Now that we have a way to mark GlobalValues as local we can use the symbol resolutions that the linker plugin provides as part of lto/thinlto link step to refine the compilers view on what symbols will end up being local. Differential Revision: https://reviews.llvm.org/D35702 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317374 91177308-0d34-0410-b5e6-96231b3b80d8
2017-11-01LTO: Apply global DCE to ThinLTO modules at LTO opt level 0.Peter Collingbourne
This is necessary because DCE is applied to full LTO modules. Without this change, a reference from a dead ThinLTO global to a dead full LTO global will result in an undefined reference at link time. This problem is only observable when --gc-sections is disabled, or when targeting COFF, as the COFF port of lld requires all symbols to have a definition even if all references are dead (this is consistent with link.exe). This change also adds an EliminateAvailableExternally pass at -O0. This is necessary to handle the situation on Windows where a non-prevailing copy of a linkonce_odr function has an SEH filter function; any such filters must be DCE'd because they will contain a call to the llvm.localrecover intrinsic, passing as an argument the address of the function that the filter belongs to, and llvm.localrecover requires this function to be defined locally. Fixes PR35142. Differential Revision: https://reviews.llvm.org/D39484 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317108 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-02Move the stripping of invalid debug info from the Verifier to AutoUpgrade.Adrian Prantl
This came out of a recent discussion on llvm-dev (https://reviews.llvm.org/D38042). Currently the Verifier will strip the debug info metadata from a module if it finds the dbeug info to be malformed. This feature is very valuable since it allows us to improve the Verifier by making it stricter without breaking bcompatibility, but arguable the Verifier pass should not be modifying the IR. This patch moves the stripping of broken debug info into AutoUpgrade (UpgradeDebugInfo to be precise), which is a much better location for this since the stripping of malformed (i.e., produced by older, buggy versions of Clang) is a (harsh) form of AutoUpgrade. This change is mostly NFC in nature, the one big difference is the behavior when LLVM module passes are introducing malformed debug info. Prior to this patch, a NoAsserts build would have printed a warning and stripped the debug info, after this patch the Verifier will report a fatal error. I believe this behavior is actually more desirable anyway. Differential Revision: https://reviews.llvm.org/D38184 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314699 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-14Reland r313157, "ThinLTO: Correctly follow aliasee references when dead ↵Peter Collingbourne
stripping." which was reverted in r313222. This reland includes a fix for the LowerTypeTests pass so that it looks past aliases when determining which type identifiers are live. Differential Revision: https://reviews.llvm.org/D37842 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313229 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-14Revert r313157 "ThinLTO: Correctly follow aliasee references when dead ↵Hans Wennborg
stripping." This broke Chromium's CFI build; see crbug.com/765004. > We were previously handling aliases during dead stripping by adding > the aliased global's "original name" GUID to the worklist. This will > lead to incorrect behaviour if the global has local linkage because > the original name GUID will not correspond to the global's GUID in > the summary. > > Because an alias is just another name for the global that it > references, there is no need to mark the referenced global as used, > or to follow references from any other copies of the global. So all > we need to do is to follow references from the aliasee's summary > instead of the alias. > > Differential Revision: https://reviews.llvm.org/D37789 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313222 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-13ThinLTO: Correctly follow aliasee references when dead stripping.Peter Collingbourne
We were previously handling aliases during dead stripping by adding the aliased global's "original name" GUID to the worklist. This will lead to incorrect behaviour if the global has local linkage because the original name GUID will not correspond to the global's GUID in the summary. Because an alias is just another name for the global that it references, there is no need to mark the referenced global as used, or to follow references from any other copies of the global. So all we need to do is to follow references from the aliasee's summary instead of the alias. Differential Revision: https://reviews.llvm.org/D37789 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313157 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-30Canonicalize the representation of empty an expression in ↵Adrian Prantl
DIGlobalVariableExpression This change simplifies code that has to deal with DIGlobalVariableExpression and mirrors how we treat DIExpressions in debug info intrinsics. Before this change there were two ways of representing empty expressions on globals, a nullptr and an empty !DIExpression(). If someone needs to upgrade out-of-tree testcases: perl -pi -e 's/(!DIGlobalVariableExpression\(var: ![0-9]*)\)/\1, expr: !DIExpression())/g' <MYTEST.ll> will catch 95%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312144 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-21Emit only A Single Opt Remark When InliningSam Elliott
Summary: This updates the Inliner to only add a single Optimization Remark when Inlining, rather than an Analysis Remark and an Optimization Remark. Fixes https://bugs.llvm.org/show_bug.cgi?id=33786 Reviewers: anemet, davidxl, chandlerc Reviewed By: anemet Subscribers: haicheng, fhahn, mehdi_amini, dblaikie, llvm-commits, eraman Differential Revision: https://reviews.llvm.org/D36054 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311349 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-20Revert "Emit only A Single Opt Remark When Inlining"Sam Elliott
Reverting due to clang build failure git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311274 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-20Emit only A Single Opt Remark When InliningSam Elliott
Summary: This updates the Inliner to only add a single Optimization Remark when Inlining, rather than an Analysis Remark and an Optimization Remark. Fixes https://bugs.llvm.org/show_bug.cgi?id=33786 Reviewers: anemet, davidxl, chandlerc Reviewed By: anemet Subscribers: haicheng, fhahn, mehdi_amini, dblaikie, llvm-commits, eraman Differential Revision: https://reviews.llvm.org/D36054 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311273 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-15[llvm] Get rid of "%T" expansionsKuba Mracek
The %T lit expansion expands to a common directory shared between all the tests in the same directory, which is unexpected and unintuitive, and more importantly, it's been a source of subtle race conditions and flaky tests. In https://reviews.llvm.org/D35396, it was agreed that it would be best to simply ban %T and only keep %t, which is unique to each test. When a test needs a temporary directory, it can just create one using mkdir %t. This patch removes %T in llvm. Differential Revision: https://reviews.llvm.org/D36495 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310953 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-10Linker: Create a function declaration when moving a non-prevailing alias of ↵Peter Collingbourne
function type. We were previously creating a global variable of function type, which is invalid IR. This issue was exposed by r304690, in which we started asserting that global variables were of a valid type. Fixes PR33462. Differential Revision: https://reviews.llvm.org/D36438 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310543 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-02Update the new PM pipeline to make ICP aware if it is SamplePGO build.Dehao Chen
Summary: In ThinLTO backend compile, OPTOptions are not set so that the ICP in ThinLTO backend does not know if it is a SamplePGO build, in which profile count needs to be annotated directly on call instructions. This patch cleaned up the PGOOptions handling logic and passes down PGOOptions to ThinLTO backend. Reviewers: chandlerc, tejohnson, davidxl Reviewed By: chandlerc Subscribers: sanjoy, llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D36052 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309780 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-28[LTO] llvm-lto2: Add option to load sample profileTobias Edler von Koch
Summary: This exposes LTO's Conf.SampleProfile as a command line option (-lto-sample-profile-file) for testing via the llvm-lto2 utility. Reviewers: pcc, danielcdh Subscribers: mehdi_amini, inglorion, llvm-commits Differential Revision: https://reviews.llvm.org/D36030 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309456 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-19LTO: Export functions referenced by the CFI jump table.Peter Collingbourne
If the LowerTypeTests pass decides to add a function to a jump table for CFI, it will add its name to the set cfiFunctionDefs, which among other things will cause the function to be renamed in the ThinLTO backend. One other thing that we must do with such functions is to not internalize them, because the jump table in the full LTO object will contain a reference to the actual function body in the ThinLTO object. This patch handles that by ensuring that we export any functions whose names appear in the cfiFunctionDefs set. Fixes PR33831. Differential Revision: https://reviews.llvm.org/D35605 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308504 91177308-0d34-0410-b5e6-96231b3b80d8
2017-07-06[LTO] Fix the interaction between linker redefined symbols and ThinLTODavide Italiano
This is the same as r304719 but for ThinLTO. The substantial difference is that in this case we don't have whole visibility, just the summary. In the LTO case, when we got the resolution for the input file we could just see if the linker told us whether a symbol was linker redefined (using --wrap or --defsym) and switch the linkage directly for the GV. Here, we have the summary. So, we record that the linkage changed from <whatever it was> to $weakany to prevent IPOs across this symbol boundaries and actually just switch the linkage at FunctionImport time. This patch should also fixes the lld bits (as all the scaffolding for communicating if a symbol is linker redefined should be there & should be the same), but I'll make sure to add some tests there as well. Fixes PR33192. Differential Revision: https://reviews.llvm.org/D35064 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307303 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-30[LTO] Remove values from non-prevailing comdatsTeresa Johnson
Summary: When linking a regular LTO module, if it has any non-prevailing values (dropped to available_externally) in comdats, we need to do more than just remove those values from their comdat. We also remove all values from that comdat, so as to avoid leaving an incomplete comdat. This is necessary in case we are compiling in mixed regular and ThinLTO mode, since the resulting regularLTO native object is always linked into the final binary first. We need to prevent the linker from selecting an incomplete comdat that was not the prevailing copy. Fixes PR32980. Reviewers: pcc, rafael Subscribers: mehdi_amini, david2050, llvm-commits, inglorion Differential Revision: https://reviews.llvm.org/D34803 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306826 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-15Apply summary-based dead stripping to regular LTO modules with summaries.Peter Collingbourne
If a regular LTO module has a summary index, then instead of linking it into the combined regular LTO module right away, add it to the combined summary index and associate it with a special module that represents the combined regular LTO module. Any such modules are linked during LTO::run(), at which time we use the results of summary-based dead stripping to control whether to link prevailing symbols. Differential Revision: https://reviews.llvm.org/D33922 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305482 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-12IR: Replace the "Linker Options" module flag with "llvm.linker.options" ↵Peter Collingbourne
named metadata. The new metadata is easier to manipulate than module flags. Differential Revision: https://reviews.llvm.org/D31349 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305227 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-07[Linker] Remove warning when linking ARM and Thumb IR modules.Florian Hahn
Summary: This patch updates Triple::isCompatibleWith to make armxx and thumbxx triples compatible, as long as the subarch, vendor, os, envorionment and object format match. Thumb/ARM code generation should be controlled using the thumb-mode per-function target feature rather than by the triple to allow mixing Thumb and ARM functions. D33448 updates Clang's codegen to add thumb-mode for all functions with armxx or thumbxx triples. Reviewers: echristo, t.p.northover, rafael, kristof.beyls, rengolin, tejohnson Reviewed By: tejohnson Subscribers: rinon, eugenis, pcc, srhines, aemerson, mehdi_amini, javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D33287 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304884 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-05Symbols re-defined with -wrap and -defsym need to be excluded from inter-Dmitry Mikulin
procedural optimizations to prevent dropping symbols and allow the linker to process re-directs. PR33145: --wrap doesn't work with lto. Differential Revision: https://reviews.llvm.org/D33621 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304719 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-26PMB: Run the whole-program-devirt pass during LTO at --lto-O0.Peter Collingbourne
The whole-program-devirt pass needs to run at -O0 because only it knows about the llvm.type.checked.load intrinsic: it needs to both lower the intrinsic itself and handle it in the summary. Differential Revision: https://reviews.llvm.org/D33571 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304019 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25LTO: Do summary-based prevailing symbol resolution at --lto-O0.Peter Collingbourne
Prevailing symbol resolution is necessary for correctness. Without this we can end up dropping a referenced linkonce symbol from the link. Differential Revision: https://reviews.llvm.org/D33570 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303939 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-20Revert "Revert "ThinLTO: Verify bitcode before lauching the ↵Adrian Prantl
ThinLTOCodeGenerator."" This reapplies commit r303438 modified to not verify cross-imported bitcode in FunctionImporter. rdar://problem/31233625 Differential Revision: https://reviews.llvm.org/D33370 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303470 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-19Revert "ThinLTO: Verify bitcode before lauching the ThinLTOCodeGenerator."Adrian Prantl
This reverts commit r303438 while deliberating buildbot breakage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303467 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-19ThinLTO: Verify bitcode before lauching the ThinLTOCodeGenerator.Adrian Prantl
rdar://problem/31233625 Differential Revision: https://reviews.llvm.org/D33151 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303438 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-15Add support for handling ifuncs to GlobalValue::getBaseObjectTeresa Johnson
Summary: All GlobalIndirectSymbol types (not just GlobalAlias) should return their base object. Without this patch LTO would warn "Unable to determine comdat of alias!" for an ifunc. Reviewers: pcc Subscribers: mehdi_amini, inglorion, llvm-commits Differential Revision: https://reviews.llvm.org/D33202 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303096 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-26LTO: Mark undefined module asm symbols as used.Peter Collingbourne
Marking them as used causes them to be considered visible outside of LTO. This prevents the symbols from being internalized or discarded, either by GlobalDCE or by summary-based dead stripping in ThinLTO. This change makes it unnecessary to add these symbols to llvm.compiler.used in the backend, as the symbols are kept alive by virtue of being external, so remove the backend code that handles that. Fixes PR32798. Differential Revision: https://reviews.llvm.org/D32544 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301438 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-14Object, LTO: Add target triple to irsymtab and LTO API.Peter Collingbourne
Start using it in LLD to avoid needing to read bitcode again just to get the target triple, and in llvm-lto2 to avoid printing symbol table information that is inappropriate for the target. Differential Revision: https://reviews.llvm.org/D32038 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300300 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-13LTO: Pass SF_Executable flag through to InputFile::SymbolTobias Edler von Koch
Summary: The linker needs to be able to determine whether a symbol is text or data to handle the case of a common being overridden by a strong definition in an archive. If the archive contains a text member of the same name as the common, that function is discarded. However, if the archive contains a data member of the same name, that strong definition overrides the common. This is a behavior of ld.bfd, which the Qualcomm linker also supports in LTO. Here's a test case to illustrate: #### cat > 1.c << \! int blah; ! cat > 2.c << \! int blah() { return 0; } ! cat > 3.c << \! int blah = 20; ! clang -c 1.c clang -c 2.c clang -c 3.c ar cr lib.a 2.o 3.o ld 1.o lib.a -t #### The correct output is: 1.o (lib.a)3.o Thanks to Shankar Easwaran and Hemant Kulkarni for the test case! Reviewers: mehdi_amini, rafael, pcc, davide Reviewed By: pcc Subscribers: davide, llvm-commits, inglorion Differential Revision: https://reviews.llvm.org/D31901 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300205 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-12llvm-lto2: Add a dump-symtab subcommand.Peter Collingbourne
This allows us to test the symbol table APIs for LTO input files. Differential Revision: https://reviews.llvm.org/D31920 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300086 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-11llvm-lto2: Move the LTO::run() action behind a subcommand.Peter Collingbourne
Move LTO::run() to a "run" subcommand so that we can introduce new subcommands for testing different parts of the LTO implementation. This doesn't use llvm::cl subcommands because it doesn't appear to be currently possible to pass an argument not associated with a subcommand to a subcommand (e.g. -lto-use-new-pm, -mcpu=yonah). Differential Revision: https://reviews.llvm.org/D31410 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299967 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-09Perform symbol binding for .symver versioned symbolsTeresa Johnson
Summary: In a .symver assembler directive like: .symver name, name2@@nodename "name2@@nodename" should get the same symbol binding as "name". While the ELF object writer is updating the symbol binding for .symver aliases before emitting the object file, not doing so when the module inline assembly is handled by the RecordStreamer is causing the wrong behavior in *LTO mode. E.g. when "name" is global, "name2@@nodename" must also be marked as global. Otherwise, the symbol is skipped when iterating over the LTO InputFile symbols (InputFile::Symbol::shouldSkip). So, for example, when performing any *LTO via the gold-plugin, the versioned symbol definition is not recorded by the plugin and passed back to the linker. If the object was in an archive, and there were no other symbols needed from that object, the object would not be included in the final link and references to the versioned symbol are undefined. The llvm-lto2 tests added will give an error about an unused symbol resolution without the fix. Reviewers: rafael, pcc Reviewed By: pcc Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D30485 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297332 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-07Add a testcase for r297072.Adrian Prantl
Check that missing debug locations on inlinable calls are a recoverable error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297113 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15Implement intrinsic mangling for literal struct types.Daniel Berlin
Fixes PR 31921 Summary: Predicateinfo requires an ugly workaround to try to avoid literal struct types due to the intrinsic mangling not being implemented. This workaround actually does not work in all cases (you can hit the assert by bootstrapping with -print-predicateinfo), and can't be made to work without DFS'ing the type (IE copying getMangledStr and using a version that detects if it would crash). Rather than do that, i just implemented the mangling. It seems simple, since they are unified structurally. Looking at the overloaded-mangling testcase we have, it actually turns out the gc intrinsics will *also* crash if you try to use a literal struct. Thus, the testcase added fails before this patch, and works after, without needing to resort to predicateinfo. Reviewers: chandlerc, davide Subscribers: llvm-commits, sanjoy Differential Revision: https://reviews.llvm.org/D29925 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295253 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-15[LTO] Add ability to emit assembly to new LTO APITobias Edler von Koch
Summary: Add a field to LTO::Config, CGFileType, to select the file type to emit (object or assembly). This is useful for testing and to implement -save-temps. Reviewers: tejohnson, mehdi_amini, pcc Reviewed By: mehdi_amini Subscribers: davide, llvm-commits Differential Revision: https://reviews.llvm.org/D29475 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295226 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-12[LTO] Remove useless redirection from test. NFCI.Davide Italiano
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294889 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-12[lib/LTO] Add support for hotness optremarks in the new API.Davide Italiano
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294885 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-12[LTO] Simplify this test quite a bit, @func2 is unused/unneeded.Davide Italiano
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294884 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-12[lib/LTO] Initial support for optimization remarks in the new API.Davide Italiano
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294882 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10[tests] Be explicit about the files we want to remove.Davide Italiano
Hopefully Windows will stop whining after this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294801 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10[LTO] Make these tests robust across multiple iterations.Davide Italiano
Same as r294784, but for regular LTO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294789 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10Temporarily revert "For X86-64 linux and PPC64 linux align int128 to 16 bytes."Eric Christopher
until we can get better TargetMachine::isCompatibleDataLayout to compare - otherwise we can't code generate existing bitcode without a string equality data layout. This reverts commit r294702. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294709 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-10For X86-64 linux and PPC64 linux align int128 to 16 bytes.Eric Christopher
For other platforms we should find out what they need and likely make the same change, however, a smaller additional change is easier for platforms we know have it specified in the ABI. As part of this rewrite some of the handling in the backends for data layout and update a bunch of testcases. Based on a patch by Simonas Kazlauskas! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294702 91177308-0d34-0410-b5e6-96231b3b80d8