summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* Added ThinLTO inlining statisticsPiotr Padlewski2016-07-296-9/+445
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: copypasta doc of ImportedFunctionsInliningStatistics class \brief Calculate and dump ThinLTO specific inliner stats. The main statistics are: (1) Number of inlined imported functions, (2) Number of imported functions inlined into importing module (indirect), (3) Number of non imported functions inlined into importing module (indirect). The difference between first and the second is that first stat counts all performed inlines on imported functions, but the second one only the functions that have been eventually inlined to a function in the importing module (by a chain of inlines). Because llvm uses bottom-up inliner, it is possible to e.g. import function `A`, `B` and then inline `B` to `A`, and after this `A` might be too big to be inlined into some other function that calls it. It calculates this statistic by building graph, where the nodes are functions, and edges are performed inlines and then by marking the edges starting from not imported function. If `Verbose` is set to true, then it also dumps statistics per each inlined function, sorted by the greatest inlines count like - number of performed inlines - number of performed inlines to importing module Reviewers: eraman, tejohnson, mehdi_amini Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D22491 llvm-svn: 277089
* Revert "Don't invoke getName() from Function::isIntrinsic().", rL276942.Justin Lebar2016-07-285-19/+12
| | | | | | | | | This broke some out-of-tree AMDGPU tests that relied on the old behavior wherein isIntrinsic() would return true for any function that starts with "llvm.". And in general that change will not play nicely with out-of-tree backends. llvm-svn: 277087
* [sanitizer] Simplify and future-proof maybeMarkSanitizerLibraryCallNoBuiltin().Evgeniy Stepanov2016-07-281-17/+6
| | | | | | | | | | | | | | | | | | | | Sanitizers set nobuiltin attribute on certain library functions to avoid a situation where such function is neither instrumented nor intercepted. At the moment the list of interesting functions is hardcoded. This change replaces it with logic based on TargetLibraryInfo::hasOptimizedCodegen and the presense of readnone function attribute (sanitizers are generally interested in memory behavior of library functions). This is expected to be a no-op change: the new logic matches exactly the same set of functions. r276771 (currently reverted) added mempcpy() to the list, breaking MSan tests. With this change, r276771 can be safely re-landed. llvm-svn: 277086
* [IR] Introduce a non-integral pointer typeSanjoy Das2016-07-285-0/+111
| | | | | | | | | | | | | | | Summary: This change adds a `ni` specifier in the `datalayout` string to denote pointers in some given address spaces as "non-integral", and adds some typing rules around these special pointers. Reviewers: majnemer, chandlerc, atrick, dberlin, eli.friedman, tstellarAMD, arsenm Subscribers: arsenm, mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D22488 llvm-svn: 277085
* [BPI] Add new LazyBPI analysisAdam Nemet2016-07-289-18/+200
| | | | | | | | | | | | | | | | | | | | | | Summary: The motivation is the same as in D22141: In order to add the hotness attribute to optimization remarks we need BFI to be available in all passes that emit optimization remarks. BFI depends on BPI so unless we make this lazy as well we would still compute BPI unconditionally. The solution is to use the new LazyBPI pass in LazyBFI and only compute BPI when computation of BFI is requested by the client. I extended the laziness test using a LoopDistribute test to also cover BPI. Reviewers: hfinkel, davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D22835 llvm-svn: 277083
* AMDGPU/SI: Don't handle a loop if there is no loop at all for a terminator BB.Changpeng Fang2016-07-282-0/+73
| | | | | | | | Differential Revision: http://reviews.llvm.org/D22021 Reviewed by: arsenm llvm-svn: 277073
* Do not remove empty lifetime.start/lifetime.end rangesVitaly Buka2016-07-282-0/+40
| | | | | | | | | | | | | | | | | | | | | | | Summary: Asan stack-use-after-scope check should poison alloca even if there is no access between start and end. This is possible for code like this: for (int i = 0; i < 3; i++) { int x; p = &x; } "Loop Invariant Code Motion" will move "p = &x;" out of the loop, making start/end range empty. PR27453 Reviewers: eugenis Differential Revision: https://reviews.llvm.org/D22842 llvm-svn: 277072
* Should be committed as one CL.Vitaly Buka2016-07-282-40/+0
| | | | | | This reverts commits r277068 r277067 r277066. llvm-svn: 277071
* [asan] Add const into few methodsVitaly Buka2016-07-281-10/+10
| | | | | | | | | | | | Summary: No functional changes Reviewers: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D22899 llvm-svn: 277069
* Do not remove empty lifetime.start/lifetime.end rangesVitaly Buka2016-07-282-18/+13
| | | | | | | | | | | | | | | | | | | | | | | Summary: Asan stack-use-after-scope check should poison alloca even if there is no access between start and end. This is possible for code like this: for (int i = 0; i < 3; i++) { int x; p = &x; } "Loop Invariant Code Motion" will move "p = &x;" out of the loop, making start/end range empty. PR27453 Reviewers: eugenis Differential Revision: https://reviews.llvm.org/D22842 llvm-svn: 277068
* manedVitaly Buka2016-07-282-6/+45
| | | | llvm-svn: 277067
* rangeVitaly Buka2016-07-281-0/+6
| | | | llvm-svn: 277066
* Rework CFG simplification in bugpointDaniel Berlin2016-07-281-48/+164
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Depends on D22841 We now use a much simpler CFG simplification routine for bugpoint, because SimplifyCFG is no longer a good match for what bugpoint wants to do. At the same time, to make sure we don't lose anything valuable it was doing, SimplifyCFG is now run as a per-BB reduction pass. With this and D22841 combined, bugpoint operates both much faster on the large testcases i have, and reduces them to pretty much minimal testcases (in one case, bugpoint used to leave about 6000 useless blocks, and now it leaves 3 ...) Reviewers: chandlerc, majnemer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D22845 llvm-svn: 277063
* [PM] Port LowerGuardIntrinsic to the new PM.Michael Kuperstein2016-07-287-10/+55
| | | | llvm-svn: 277057
* Fix some sign compare warnings breaking the -Werror buildDavid Blaikie2016-07-281-2/+2
| | | | llvm-svn: 277040
* Revert r277038 until clearing why tests fail.Alina Sbirlea2016-07-281-9/+10
| | | | llvm-svn: 277039
* Remove TargetBaseAlign. Keep alignment for stack adjustments.Alina Sbirlea2016-07-281-10/+9
| | | | | | | | | | | | | | Summary: TargetBaseAlign is no longer required since LSV checks if target allows misaligned accesses. A constant defining a base alignment is still needed for stack accesses where alignment can be adjusted. Reviewers: llvm-commits, jlebar Subscribers: mzolotukhin, arsenm Differential Revision: https://reviews.llvm.org/D22936 llvm-svn: 277038
* Really try to pacify the build bots :/David Majnemer2016-07-281-1/+1
| | | | llvm-svn: 277037
* Try to passify the buildersDavid Majnemer2016-07-281-0/+1
| | | | llvm-svn: 277036
* [coroutines] Part 3 of N: Adding Boilerplate for Coroutine PassesDavid Majnemer2016-07-2816-3/+385
| | | | | | | | | | | | | This adds boilerplate code for all coroutine passes, the passes are no-ops for now. Also, a small test has been added to verify that passes execute in the expected order or not at all if coroutine support is disabled. Patch by Gor Nishanov! Differential Revision: https://reviews.llvm.org/D22847 llvm-svn: 277033
* [docs] Add sub-mod example by Chris to GitHub proposalRenato Golin2016-07-281-0/+5
| | | | llvm-svn: 277032
* Fix build breaks after r277028Krzysztof Parzyszek2016-07-282-1/+5
| | | | llvm-svn: 277031
* Missed updating a GlobalISel bit in my last commitMatthias Braun2016-07-281-1/+1
| | | | | | GlobalISel isn't built by default so I missed it. llvm-svn: 277030
* [Hexagon] Implement MI-level constant propagationKrzysztof Parzyszek2016-07-2813-2/+3402
| | | | llvm-svn: 277028
* Fix DbgValue handling in SelectionDAG.Nirav Dave2016-07-281-2/+3
| | | | | | | [DAG] Relocate TransferDbgValues in ReplaceAllUsesWith(SDValue, SDValue) to before we modify the CSE maps. llvm-svn: 277027
* [pdb] Fix another narrowing conversion on x64 builds.Zachary Turner2016-07-281-1/+1
| | | | llvm-svn: 277026
* [pdb] Fix an ambiguity when writing size_t on x64 platforms.Zachary Turner2016-07-281-1/+2
| | | | llvm-svn: 277025
* [pdb] Fix some warnings that break -Werror builds.Zachary Turner2016-07-282-3/+3
| | | | llvm-svn: 277021
* [Hexagon] Insert CFI instructions before throwing callsKrzysztof Parzyszek2016-07-282-20/+103
| | | | | | | | Normally, CFI instructions should be inserted after allocframe, but if allocframe is in the same packet with a call, the CFI instructions should be inserted before that packet. llvm-svn: 277020
* [pdb] Refactor library to more clearly separate reading/writingZachary Turner2016-07-2852-857/+957
| | | | | | | Reviewed By: amccarth, ruiu Differential Revision: https://reviews.llvm.org/D22693 llvm-svn: 277019
* Get rid of IMsfStreamData class.Zachary Turner2016-07-2819-261/+177
| | | | | | | | | | | | | | | | | | | | This was a pure virtual base class whose purpose was to abstract away the notion of how you retrieve the layout of a discontiguous stream of blocks in an Msf file. This led to too many layers of abstraction making it difficult to figure out what was going on and extend things. Ultimately, a stream's layout is decided by its length and the array of block numbers that it lives on. So rather than have an abstract base class which can return this in any number of ways, it's more straightforward to simply store them as fields of a trivial struct, and also to give a more appropriate name. This patch does that. It renames IMsfStreamData to MsfStreamLayout, and deletes the 2 concrete implementations, DirectoryStreamData and IndexedStreamData. MsfStreamLayout is a trivial struct with the necessary data. llvm-svn: 277018
* MachineFunction: Return reference for getFrameInfo(); NFCMatthias Braun2016-07-28129-1141/+1136
| | | | | | | getFrameInfo() never returns nullptr so we should use a reference instead of a pointer. llvm-svn: 277017
* Fix dangling reference to temporary in use of ArrayRefReid Kleckner2016-07-281-1/+3
| | | | | | Fixes tests locally for me with MSVC 2015. llvm-svn: 277015
* Revert r276973 "Adjust Registry interface to not require plugins to export a ↵John Brawn2016-07-283-26/+59
| | | | | | | | | registry" Buildbot failures when building with clang -Werror. Reverting while I try to figure this out. llvm-svn: 277008
* [AArch64][GlobalISel] Select G_BR.Ahmed Bougacha2016-07-282-8/+31
| | | | | | | This is the first unsized instruction we support; move down the 'sized' check to binops. llvm-svn: 277007
* [MIRParser] Accept unsized generic instructions.Ahmed Bougacha2016-07-283-28/+21
| | | | | | | Since r276158, we require generic instructions to have a sized type. G_BR doesn't; relax the restriction. llvm-svn: 277006
* [AArch64][GlobalISel] Select GPR G_SUB.Ahmed Bougacha2016-07-282-1/+57
| | | | llvm-svn: 277003
* [AArch64][GlobalISel] Select GPR G_AND.Ahmed Bougacha2016-07-282-0/+56
| | | | llvm-svn: 277002
* [GlobalISel] Remove types on selected insts instead of using LLT().Ahmed Bougacha2016-07-285-3/+20
| | | | | | | | | | LLT() has a particular meaning: it's one invalid type. But we really want selected instructions to have no type whatsoever. Also verify that types don't linger after ISel, and enable the verifier on the AArch64 select test. llvm-svn: 277001
* [AArch64][GlobalISel] Remove 'alignment' from MIR tests. NFC.Ahmed Bougacha2016-07-281-4/+0
| | | | llvm-svn: 277000
* AMDGPU : Add intrinsics for compare with the full wavefront resultWei Ding2016-07-288-0/+511
| | | | | | Differential Revision: http://reviews.llvm.org/D22482 llvm-svn: 276998
* TargetInstrInfo: rename GetInstSizeInBytes to getInstSizeInBytes. NFCSjoerd Meijer2016-07-2823-50/+50
| | | | | | Differential Revision: https://reviews.llvm.org/D22925 llvm-svn: 276997
* [mips] Fix a warning that occurs on some gcc 4.9.2's but not all of them.Daniel Sanders2016-07-281-4/+4
| | | | llvm-svn: 276993
* Revert r276982 and r276984: [mips][fastisel] Handle 0-4 arguments without ↵Daniel Sanders2016-07-2825-191/+50
| | | | | | | | | SelectionDAG It seems that the stack offset in callabi.ll varies between machines. I'll look into it. llvm-svn: 276989
* [X86] Remove CustomInserter for FMA3 instructions. Looks like since we got ↵Craig Topper2016-07-283-196/+2
| | | | | | | | full commuting support for FMAs after this was added, the coalescer can now get this right on its own. Differential Revision: https://reviews.llvm.org/D22799 llvm-svn: 276987
* [mips] Reword debug message as should have been done before committing r276982Daniel Sanders2016-07-281-1/+1
| | | | llvm-svn: 276984
* [mips][fastisel] Handle 0-4 arguments without SelectionDAG.Daniel Sanders2016-07-2825-50/+191
| | | | | | | | | | | | | | | | | | | Summary: Implements fastLowerArguments() to avoid the need to fall back on SelectionDAG for 0-4 argument functions that don't do tricky things like passing double in a pair of i32's. This allows us to move all except one test to -fast-isel-abort=3. The remaining one has function prototypes of the form 'i32 (i32, double, double)' which requires floats to be passed in GPR's. Reviewers: sdardis Subscribers: dsanders, llvm-commits, sdardis Differential Revision: https://reviews.llvm.org/D22680 llvm-svn: 276982
* AMDGPU/SI: Don't use reserved VGPRs for SGPR spillingTom Stellard2016-07-284-6/+12
| | | | | | | | | | | | | | | Summary: We were using reserved VGPRs for SGPR spilling and this was causing some programs with a workgroup size of 1024 to use more than 64 registers, which is illegal. Reviewers: arsenm, mareko, nhaehnle Subscribers: nhaehnle, arsenm, llvm-commits, kzhuravl Differential Revision: https://reviews.llvm.org/D22032 llvm-svn: 276980
* Removed unused variablesSimon Pilgrim2016-07-281-12/+0
| | | | llvm-svn: 276975
* Fix signed/unsigned warning.Simon Pilgrim2016-07-281-6/+6
| | | | llvm-svn: 276974
OpenPOWER on IntegriCloud