aboutsummaryrefslogtreecommitdiffstats
path: root/tools/opt
Commit message (Collapse)AuthorAgeFilesLines
* Fix Android.mk files for plugins on darwin.Stephen Hines2015-06-081-0/+4
| | | | | | | | Darwin uses a few different flags for this than Linux, and we missed this when we updated the test builds recently. Change-Id: I8a0e8bc18ef698a0ed933f96b2bce0653f4307e5 (cherry picked from commit 651de8d5ac0b28b10ad0259efc75cf6152dc13dc)
* Update aosp/master LLVM for rebase to r235153Pirama Arumuga Nainar2015-05-184-28/+68
| | | | | Change-Id: I9bf53792f9fc30570e81a8d80d296c681d005ea7 (cherry picked from commit 0c7f116bb6950ef819323d855415b2f2b0aad987)
* Export all dynamic symbols for opt and bugpointPirama Arumuga Nainar2015-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug 15433215 Command line options from an LLVM module are registered and stored in a static global object in libLLVMSupport. Linking the Hello module with its own copy of libLLVMSupport meant this module's option was not registered correctly. This patch updates Hello's build rules to not link with libLLVMSupport and libLLVMCore. Given the above change, the Hello module still needs to find LLVM symbols that it used to pull directly. The second half of this patch adds linker flag --export-dynamic to tools/opt and tools/bugpoint so loaded modules can find LLVM symbols. Other notes: - The linker flag is not added to the device build of opt. No one should be running opt on the device, AFAIK. - Other tools that load modules, such as llc, lli and even clang, would need this linker flag if they were to load modules correctly. Now that we know how to fix the incorrect module loads, they can be fixed if the need arises. - Remove a duplicate from opt's llvm_opt_STATIC_LIBRARIES. All supported tests pass! Cherry pick of https://android-review.googlesource.com/#/c/148017/ from AOSP Change-Id: Ib76507ccfeae37a368718c5a1fb69da337f4f964
* Update aosp/master llvm for rebase to r233350Pirama Arumuga Nainar2015-04-099-618/+18
| | | | Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
* Update aosp/master LLVM for rebase to r230699.Stephen Hines2015-03-236-165/+324
| | | | Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
* Build opt for the device.Tim Murray2014-12-191-0/+16
| | | | Change-Id: I3b62c323c3d0062b5de3900f7e285f0dbf2ce533
* Update aosp/master LLVM for rebase to r222494.Stephen Hines2014-12-024-79/+29
| | | | Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
* Update LLVM for rebase to r212749.Stephen Hines2014-07-212-0/+2
| | | | | | | Includes a cherry-pick of: r212948 - fixes a small issue with atomic calls Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
* Adds the ability to run the llvm test suite in-tree.Chris Wailes2014-06-061-46/+47
| | | | | | | | | | | | | | | | | This was accomplished by building additional tools and hand-generating several files that are auto-generated by the configuration system when LLVM is built out-of-tree. The LTO, Interpreter, and DebugInfo libraries are now being compiled, and several source files were added to existing compilation targets. To run these tests you must first run build/envsetup.sh and have used lunch to select a target. You can then launch the test script by running: cd $ANDROID_BUILD_TOP/external/llvm && ./android_test.sh Bug: 15433215 Change-Id: I43d87de0a4620cdd46c8d0f825dd4428e8409702
* Update LLVM for 3.5 rebase (r209712).Stephen Hines2014-05-295-27/+225
| | | | Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
* Update to LLVM 3.5a.Stephen Hines2014-04-2416-364/+981
| | | | Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
* Merge remote-tracking branch 'upstream/release_34' into merge-20140211Stephen Hines2014-02-111-5/+32
|\ | | | | | | | | | | | | | | Conflicts: lib/Linker/LinkModules.cpp lib/Support/Unix/Signals.inc Change-Id: Ia54f291fa5dc828052d2412736e8495c1282aa64
| * Merging r196294:Bill Wendling2013-12-071-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r196294 | arnolds | 2013-12-03 08:33:06 -0800 (Tue, 03 Dec 2013) | 7 lines opt: Mirror vectorization presets of clang clang enables vectorization at optimization levels > 1 and size level < 2. opt should behave similarily. Loop vectorization and SLP vectorization can be disabled with the flags -disable-(loop/slp)-vectorization. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@196649 91177308-0d34-0410-b5e6-96231b3b80d8
| * Debug Info: In DIBuilder, the context field of subprogram is updated to useManman Ren2013-10-101-1/+1
| | | | | | | | | | | | | | | | | | DIScopeRef. A paired commit at clang is required due to changes to DIBuilder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192378 91177308-0d34-0410-b5e6-96231b3b80d8
| * Test commit. Remove whitespace from otherwise empty lines.Greg Bedwell2013-10-091-2/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192284 91177308-0d34-0410-b5e6-96231b3b80d8
| * Lift alignment restrictions for load/store folding on ↵Craig Topper2013-09-181-0/+1
| | | | | | | | | | | | VINSERTF128/VEXTRACTF128. Fixes PR17268. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190916 91177308-0d34-0410-b5e6-96231b3b80d8
| * Debug Info: Use DIScopeRef for DIType::getContext.Manman Ren2013-09-091-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In DIBuilder, the context field of a TAG_member is updated to use the scope reference. Verifier is updated accordingly. DebugInfoFinder now needs to generate a type identifier map to have access to the actual scope. Same applies for BreakpointPrinter. processModule of DebugInfoFinder is called during initialization phase of the verifier to make sure the type identifier map is constructed early enough. We are now able to unique a simple class as demonstrated by the added testing case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190334 91177308-0d34-0410-b5e6-96231b3b80d8
| * Disable unrolling in the loop vectorizer when disabled in the pass managerHal Finkel2013-08-281-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When unrolling is disabled in the pass manager, the loop vectorizer should also not unroll loops. This will allow the -fno-unroll-loops option in Clang to behave as expected (even for vectorizable loops). The loop vectorizer's -force-vector-unroll option will (continue to) override the pass-manager setting (including -force-vector-unroll=0 to force use of the internal auto-selection logic). In order to test this, I added a flag to opt (-disable-loop-unrolling) to force disable unrolling through opt (the analog of -fno-unroll-loops in Clang). Also, this fixes a small bug in opt where the loop vectorizer was enabled only after the pass manager populated the queue of passes (the global_alias.ll test needed a slight update to the RUN line as a result of this fix). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189499 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove logic that decides whether to vectorize or not depending on O-levelsArnold Schwaighofer2013-08-131-0/+2
| | | | | | | | | | | | I have moved this logic into clang and opt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188281 91177308-0d34-0410-b5e6-96231b3b80d8
* | Merge commit '10251753b6897adcd22cc981c0cc42f348c109de' into merge-20130807Stephen Hines2013-08-071-9/+10
|\ \ | |/ | | | | | | | | | | | | Conflicts: lib/Archive/ArchiveReader.cpp lib/Support/Unix/PathV2.inc Change-Id: I29d8c1e321a4a380b6013f00bac6a8e4b593cc4e
| * Use function attributes to indicate that we don't want to realign the stack.Bill Wendling2013-08-011-1/+0
| | | | | | | | | | | | | | | | | | Function attributes are the future! So just query whether we want to realign the stack directly from the function instead of through a random target options structure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187618 91177308-0d34-0410-b5e6-96231b3b80d8
| * SimplifyCFG: Use parallel-and and parallel-or mode to consolidate branch ↵Tom Stellard2013-07-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | conditions Merge consecutive if-regions if they contain identical statements. Both transformations reduce number of branches. The transformation is guarded by a target-hook, and is currently enabled only for +R600, but the correctness has been tested on X86 target using a variety of CPU benchmarks. Patch by: Mei Ye git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187278 91177308-0d34-0410-b5e6-96231b3b80d8
| * Replace the "NoFramePointerElimNonLeaf" target option with a function attribute.Bill Wendling2013-07-251-1/+0
| | | | | | | | | | | | | | | | | | There's no need to specify a flag to omit frame pointer elimination on non-leaf nodes...(Honestly, I can't parse that option out.) Use the function attribute stuff instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187093 91177308-0d34-0410-b5e6-96231b3b80d8
| * Recommit r186217 with testcase fix:Bill Wendling2013-07-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | Use the function attributes to pass along the stack protector buffer size. Now that we have robust function attributes, don't use a command line option to specify the stack protecto buffer size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186863 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add a wrapper for open.Rafael Espindola2013-07-161-2/+2
| | | | | | | | | | | | | | This centralizes the handling of O_BINARY and opens the way for hiding more differences (like how open behaves with directories). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186447 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert commit r186217 -- this is breaking bots:Chandler Carruth2013-07-131-0/+1
| | | | | | | | | | | | | | | | | | | | http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/4328 Original commit log: Use the function attributes to pass along the stack protector buffer size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186234 91177308-0d34-0410-b5e6-96231b3b80d8
| * Use the function attributes to pass along the stack protector buffer size.Bill Wendling2013-07-121-1/+0
| | | | | | | | | | | | | | | | Now that we have robust function attributes, don't use a command line option to specify the stack protecto buffer size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186217 91177308-0d34-0410-b5e6-96231b3b80d8
| * Debug Info: clean up usage of Verify.Manman Ren2013-06-281-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. For cases where we know the type of a DI metadata, use assert. Also update testing cases to make them conform to the format of DI classes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185135 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert "Debug Info: clean up usage of Verify." as it's breaking bots.Eric Christopher2013-06-261-2/+2
| | | | | | | | | | | | This reverts commit r185020 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185032 91177308-0d34-0410-b5e6-96231b3b80d8
| * Debug Info: clean up usage of Verify.Manman Ren2013-06-261-2/+2
| | | | | | | | | | | | | | | | | | No functionality change. It should suffice to check the type of a debug info metadata, instead of calling Verify. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185020 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove the simplify-libcalls pass (finally)Meador Inge2013-06-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | This commit completely removes what is left of the simplify-libcalls pass. All of the functionality has now been migrated to the instcombine and functionattrs passes. The following C API functions are now NOPs: 1. LLVMAddSimplifyLibCallsPass 2. LLVMPassManagerBuilderSetDisableSimplifyLibCalls git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184459 91177308-0d34-0410-b5e6-96231b3b80d8
* | Merge commit '100fbdd06be7590b23c4707a98cd605bdb519498' into merge_20130612Stephen Hines2013-06-121-0/+1
|\ \ | |/
| * Add DebugIR pass -- emits IR file and replace source lines with IR lines in MDDaniel Malea2013-05-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | - requires existing debug information to be present - fixes up file name and line number information in metadata - emits a "<orig_filename>-debug.ll" succinct IR file (without !dbg metadata or debug intrinsics) that can be read by a debugger - initialize pass in opt tool to enable the "-debug-ir" flag - lit tests to follow git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181467 91177308-0d34-0410-b5e6-96231b3b80d8
* | Merge remote-tracking branch 'upstream/master' into merge-20130502Stephen Hines2013-05-024-6/+8
|\ \ | |/ | | | | | | | | | | | | Conflicts: lib/Support/Unix/Signals.inc unittests/Transforms/Utils/Cloning.cpp Change-Id: I027581a4390ec3ce4cd8d33da8b5f4c0c7d372c8
| * Revert "Recommit r179497 after fixing uninitialized variable." untilEric Christopher2013-04-151-16/+14
| | | | | | | | | | | | | | | | | | | | | | I can fix the testcases here: http://lab.llvm.org:8011/builders/clang-native-arm-cortex-a9/builds/6952 This reverts commit r179512 due to testcases specifying triples that they didn't actually mean and causing failures on other platforms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179513 91177308-0d34-0410-b5e6-96231b3b80d8
| * Recommit r179497 after fixing uninitialized variable.Eric Christopher2013-04-151-14/+16
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179512 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert "Remove some unused triple and data layout."Eric Christopher2013-04-141-16/+13
| | | | | | | | | | | | This reverts commit r179497 and the accompanying commit as it broke random platforms that aren't osx. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179499 91177308-0d34-0410-b5e6-96231b3b80d8
| * If we've specified a triple on the command line then go aheadEric Christopher2013-04-141-13/+16
| | | | | | | | | | | | | | and use that as the default triple for the module and target data layout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179497 91177308-0d34-0410-b5e6-96231b3b80d8
| * Replace uses of the deprecated std::auto_ptr with OwningPtr.Andy Gibbs2013-04-121-2/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179373 91177308-0d34-0410-b5e6-96231b3b80d8
| * Don't export symbols in every binary on linux.Rafael Espindola2013-04-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | On freebsd this makes sure that symbols are exported on the binaries that need them. The net result is that we should get symbols in the binaries that need them on every platform. On linux x86-64 this reduces the size of the bin directory from 262MB to 250MB. Patch by Stephen Checkoway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178725 91177308-0d34-0410-b5e6-96231b3b80d8
| * Manually update the dependencies in the Makefiles. It turns out that allChandler Carruth2013-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | that work on the LLVMBuild based dependency specification didn't actually work, we just now maintain dependencies in *3* places instead of 2. Yay. There may still be some missing dependencies, I'm still sifting through the bots and my builds, but this is a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177988 91177308-0d34-0410-b5e6-96231b3b80d8
| * Split out the IRReader header and the utility functions it provides intoChandler Carruth2013-03-263-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | its own library. These functions are bridging between the bitcode reader and the ll parser which are in different libraries. Previously we didn't have any good library to do this, and instead played fast and loose with a "header only" set of interfaces in the Support library. This really doesn't work well as evidenced by the recent attempt to add timing logic to the these routines. As part of this, make them normal functions rather than weird inline functions, and sink the implementation into the library. Also clean up the header to be nice and minimal. This requires updating lots of build system dependencies to specify that the IRReader library is needed, and several source files to not implicitly rely upon the header file to transitively include all manner of other headers. If you are using IRReader.h, this commit will break you (the header moved) and you'll need to also update your library usage to include 'irreader'. I will commit the corresponding change to Clang momentarily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177971 91177308-0d34-0410-b5e6-96231b3b80d8
* | Merge commit 'b3201c5cf1e183d840f7c99ff779d57f1549d8e5' into merge_20130226Stephen Hines2013-03-055-76/+6
|\ \ | |/ | | | | | | | | | | | | Conflicts: include/llvm/Support/ELF.h lib/Support/DeltaAlgorithm.cpp Change-Id: I24a4fbce62eb39d924efee3c687b55e1e17b30cd
| * Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation ↵Michael Gottesman2013-01-284-3/+4
| | | | | | | | | | | | for refactoring the ARC Optimizer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173647 91177308-0d34-0410-b5e6-96231b3b80d8
| * Sort all of the includes. Several files got checked in with mis-sortedChandler Carruth2013-01-191-1/+1
| | | | | | | | | | | | includes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172891 91177308-0d34-0410-b5e6-96231b3b80d8
| * Added -view-callgraph module pass.Andrew Trick2013-01-111-72/+1
| | | | | | | | | | | | | | | | -dot-callgraph similarly follows a standard module pass pattern. Patch by Speziale Ettore! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172220 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix #includes after my last commit.Jakub Staszak2013-01-101-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172114 91177308-0d34-0410-b5e6-96231b3b80d8
* | Merge remote-tracking branch 'upstream/master' into merge-llvmStephen Hines2013-01-217-35/+116
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp lib/MC/MCAssembler.cpp lib/Support/Atomic.cpp lib/Support/Memory.cpp lib/Target/ARM/ARMJITInfo.cpp Change-Id: Ib339baf88df5b04870c8df1bedcfe1f877ccab8d
| * Move CallGraphSCCPass.h into the Analysis tree; that's where theChandler Carruth2013-01-071-1/+1
| | | | | | | | | | | | implementation lives already. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171746 91177308-0d34-0410-b5e6-96231b3b80d8
| * Switch TargetTransformInfo from an immutable analysis pass that requiresChandler Carruth2013-01-071-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a TargetMachine to construct (and thus isn't always available), to an analysis group that supports layered implementations much like AliasAnalysis does. This is a pretty massive change, with a few parts that I was unable to easily separate (sorry), so I'll walk through it. The first step of this conversion was to make TargetTransformInfo an analysis group, and to sink the nonce implementations in ScalarTargetTransformInfo and VectorTargetTranformInfo into a NoTargetTransformInfo pass. This allows other passes to add a hard requirement on TTI, and assume they will always get at least on implementation. The TargetTransformInfo analysis group leverages the delegation chaining trick that AliasAnalysis uses, where the base class for the analysis group delegates to the previous analysis *pass*, allowing all but tho NoFoo analysis passes to only implement the parts of the interfaces they support. It also introduces a new trick where each pass in the group retains a pointer to the top-most pass that has been initialized. This allows passes to implement one API in terms of another API and benefit when some other pass above them in the stack has more precise results for the second API. The second step of this conversion is to create a pass that implements the TargetTransformInfo analysis using the target-independent abstractions in the code generator. This replaces the ScalarTargetTransformImpl and VectorTargetTransformImpl classes in lib/Target with a single pass in lib/CodeGen called BasicTargetTransformInfo. This class actually provides most of the TTI functionality, basing it upon the TargetLowering abstraction and other information in the target independent code generator. The third step of the conversion adds support to all TargetMachines to register custom analysis passes. This allows building those passes with access to TargetLowering or other target-specific classes, and it also allows each target to customize the set of analysis passes desired in the pass manager. The baseline LLVMTargetMachine implements this interface to add the BasicTTI pass to the pass manager, and all of the tools that want to support target-aware TTI passes call this routine on whatever target machine they end up with to add the appropriate passes. The fourth step of the conversion created target-specific TTI analysis passes for the X86 and ARM backends. These passes contain the custom logic that was previously in their extensions of the ScalarTargetTransformInfo and VectorTargetTransformInfo interfaces. I separated them into their own file, as now all of the interface bits are private and they just expose a function to create the pass itself. Then I extended these target machines to set up a custom set of analysis passes, first adding BasicTTI as a fallback, and then adding their customized TTI implementations. The fourth step required logic that was shared between the target independent layer and the specific targets to move to a different interface, as they no longer derive from each other. As a consequence, a helper functions were added to TargetLowering representing the common logic needed both in the target implementation and the codegen implementation of the TTI pass. While technically this is the only change that could have been committed separately, it would have been a nightmare to extract. The final step of the conversion was just to delete all the old boilerplate. This got rid of the ScalarTargetTransformInfo and VectorTargetTransformInfo classes, all of the support in all of the targets for producing instances of them, and all of the support in the tools for manually constructing a pass based around them. Now that TTI is a relatively normal analysis group, two things become straightforward. First, we can sink it into lib/Analysis which is a more natural layer for it to live. Second, clients of this interface can depend on it *always* being available which will simplify their code and behavior. These (and other) simplifications will follow in subsequent commits, this one is clearly big enough. Finally, I'm very aware that much of the comments and documentation needs to be updated. As soon as I had this working, and plausibly well commented, I wanted to get it committed and in front of the build bots. I'll be doing a few passes over documentation later if it sticks. Commits to update DragonEgg and Clang will be made presently. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171681 91177308-0d34-0410-b5e6-96231b3b80d8