summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
* Revert r246244 and r246243Steven Wu2015-08-285-258/+13
| | | | | | These two commits cause clang/llvm bootstrap to hang. llvm-svn: 246279
* Rollback r246276 - Object: Teach llvm-ar to create symbol table for COFF ↵Rui Ueyama2015-08-284-56/+1
| | | | | | | | short import files This change caused a test for llvm-readobj to fail. llvm-svn: 246277
* Object: Teach llvm-ar to create symbol table for COFF short import files.Rui Ueyama2015-08-284-1/+56
| | | | | | | | | | | | | COFF short import files are special kind of files that contains only DLL-exported symbol names. That's different from object files because it has no data except symbol names. This change implements a SymbolicFile interface for the short import files so that symbol names can be accessed through that interface. llvm-ar is now able to read the file and create symbol table entries for short import files. llvm-svn: 246276
* LLVMCodeGen: Update libdeps corresponding to r246236.NAKAMURA Takumi2015-08-281-1/+1
| | | | llvm-svn: 246274
* Tweak XFAIL line for mips.Peter Collingbourne2015-08-281-1/+1
| | | | llvm-svn: 246269
* Kaleidoscope: Prune __attribute__((used)). Some compilers wouldn't accept one.NAKAMURA Takumi2015-08-285-10/+10
| | | | llvm-svn: 246268
* Disable llvm/test/Examples/ for now while investigating.NAKAMURA Takumi2015-08-281-2/+1
| | | | | | | | FIXME: - Introduce explicit mapping. - Investigate crash on win32. Could we introduce crash handler in examples? llvm-svn: 246267
* XFAIL parallel.ll test on MIPS and AArch64 until test failures can be ↵Peter Collingbourne2015-08-281-0/+3
| | | | | | investigated. llvm-svn: 246261
* [CodeGen] Support (and default to) expanding READCYCLECOUNTER to 0.Ahmed Bougacha2015-08-286-33/+54
| | | | | | | | | | | For targets that didn't support this, this will let us respect the langref instead of failing to select. Note that we don't need to change the 32-bit x86/PPC lowerings (to account for the result type/# difference) because they're both custom and bypass type legalization. llvm-svn: 246258
* [WinEH] Update coloring to handle nested cases cleanlyJoseph Tremoulet2015-08-282-70/+498
| | | | | | | | | | | | | | | | | | | | | | | Summary: Change the coloring algorithm in WinEHPrepare to visit a funclet's exits in its parents' contexts and so properly classify the continuations of nested funclets. Also change the placement of cloned blocks to be deterministic and to maintain the relative order of each funclet's blocks. Add a lit test showing various patterns that require cloning, the last several of which don't have CHECKs yet because they require cloning entire funclets which is NYI. Reviewers: rnk, andrew.w.kaylor, majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12353 llvm-svn: 246245
* Constant propagation after hitting assume(cmp) bugfixPiotr Padlewski2015-08-285-13/+71
| | | | | | | | | Last time code run into assertion `BBE.isSingleEdge()` in lib/IR/Dominators.cpp:200. http://reviews.llvm.org/D12170 llvm-svn: 246244
* Constant propagation after hiting llvm.assumePiotr Padlewski2015-08-282-3/+190
| | | | | | | | | | | After hitting @llvm.assume(X) we can: - propagate equality that X == true - if X is icmp/fcmp (with eq operation), and one of operand is constant we can change all variables with constants in the same BasicBlock http://reviews.llvm.org/D11918 llvm-svn: 246243
* [CMake] Fix build on MSVC in r246156.NAKAMURA Takumi2015-08-281-1/+2
| | | | | | add_windows_version_resource_file() affects ALL_FILES. OBJLIB shouldn't have *.obj as SOURCES. llvm-svn: 246241
* Fix: CFLAA -- Mark no-args returns as unknownGeorge Burgess IV2015-08-282-0/+30
| | | | | | | | | | | | | | Prior to this patch, we hadn't been marking StratifiedSets with the appropriate StratifiedAttrs when handling the result of no-args call instructions. This caused us to report NoAlias when handed, for example, an escaped alloca and a result from an opaque function. Now we properly mark the return value of said functions. Thanks again to Chandler, Richard, and Nick for pinging me about this. Differential review: http://reviews.llvm.org/D12408 llvm-svn: 246240
* [AArch64][CollectLOH] Fix a regression that prevented us to detect chains ofQuentin Colombet2015-08-273-4/+580
| | | | | | | | | | | more than 2 instructions. I introduced this regression a while back and did not noticed it because I somehow forgot to push the initial test cases for the pass! Fix that as well! llvm-svn: 246239
* CodeGen: Introduce splitCodeGen and teach LTOCodeGenerator to use it.Peter Collingbourne2015-08-277-25/+213
| | | | | | | | | | | | | | | llvm::splitCodeGen is a function that implements the core of parallel LTO code generation. It uses llvm::SplitModule to split the module into linkable partitions and spawning one code generation thread per partition. The function produces multiple object files which can be linked in the usual way. This has been threaded through to LTOCodeGenerator (and llvm-lto for testing purposes). Separate patches will add parallel LTO support to the gold plugin and lld. Differential Revision: http://reviews.llvm.org/D12260 llvm-svn: 246236
* [WinEH] Add some support for code generating catchpadReid Kleckner2015-08-2738-90/+357
| | | | | | | We can now run 32-bit programs with empty catch bodies. The next step is to change PEI so that we get funclet prologues and epilogues. llvm-svn: 246235
* [yaml2obj] Support numeric indexes to create invalid files. Will be used by ↵Michael J. Spencer2015-08-271-3/+5
| | | | | | lld test. llvm-svn: 246233
* [ValueTracking] readnone CallInsts are fair game for speculationDavid Majnemer2015-08-272-39/+21
| | | | | | | | | | Any call which is side effect free is trivially OK to speculate. We already had similar logic in EarlyCSE and GVN but we were missing it from isSafeToSpeculativelyExecute. This fixes PR24601. llvm-svn: 246232
* Add a global mapping layer for Orc. Adapted from a patch by Andy Somogyi.Lang Hames2015-08-273-0/+164
| | | | | | Thanks Andy! llvm-svn: 246226
* Support: Introduce thread.h.Peter Collingbourne2015-08-271-0/+34
| | | | | | | This header is a wrapper for <thread> that works around problems with the MSVC headers when exceptions are disabled. llvm-svn: 246218
* [CodeGen] Check FoldConstantArithmetic result before using it.Ahmed Bougacha2015-08-272-2/+20
| | | | | | | | Fixes PR24602: r245689 introduced an unguarded use of SelectionDAG::FoldConstantArithmetic, which returns 0 when it fails because of opaque (hoisted) constants. llvm-svn: 246217
* [TableGen][DAGISel] Dedup predicates with same code to run. NFCI.Ahmed Bougacha2015-08-271-4/+25
| | | | | | | | | | | I locally hit the 255 limit, but a lot of these are redundant: each predicate coming from a different record was allocated a new number, even when we already emitted the same code for another predicate. Instead, re-use numbers and emit the predicate code only once. This reduces the total text size of *DAGISel.cpp.o by ~1%. llvm-svn: 246208
* Fix test introduced in r246187 that failed on some systems.Tyler Nowicki2015-08-271-7/+5
| | | | llvm-svn: 246207
* Oops - Re-add the Kaleidoscope regression tests themselves (accidentally leftLang Hames2015-08-276-0/+85
| | | | | | out of r246201). llvm-svn: 246203
* Recommit r246175 - Add Kaleidoscope regression tests, with a fix to make sureLang Hames2015-08-2715-21/+53
| | | | | | the kaleidoscope 'library' functions aren't dead-stripped in release builds. llvm-svn: 246201
* Enable constant propagation for more math functionsErik Schnetter2015-08-272-78/+732
| | | | | | | | | | | | Constant propagation for single precision math functions (such as tanf) is already working, but was not enabled. This patch enables these for many single-precision functions, and adds respective test cases. Newly handled functions: acosf asinf atanf atan2f ceilf coshf expf exp2f fabsf floorf fmodf logf log10f powf sinhf tanf tanhf llvm-svn: 246194
* Revert 246186; still breaks on some systemsErik Schnetter2015-08-272-732/+78
| | | | llvm-svn: 246191
* Improve vectorization diagnostic messages and extend vectorize(enable) pragma.Tyler Nowicki2015-08-273-21/+45
| | | | | | | | | | | | | | | | This patch changes the analysis diagnostics produced when loops with floating-point recurrences or memory operations are identified. The new messages say "cannot prove it is safe to reorder * operations; allow reordering by specifying #pragma clang loop vectorize(enable)". Depending on the type of diagnostic the message will include additional options such as ffast-math or __restrict__. This patch also allows the vectorize(enable) pragma to override the low pointer memory check threshold. When the hint is given a higher threshold is used. See the clang patch for the options produced for each diagnostic. llvm-svn: 246187
* Enable constant propagation for more math functionsErik Schnetter2015-08-272-78/+732
| | | | | | | | | | | | Constant propagation for single precision math functions (such as tanf) is already working, but was not enabled. This patch enables these for many single-precision functions, and adds respective test cases. Newly handled functions: acosf asinf atanf atan2f ceilf coshf expf exp2f fabsf floorf fmodf logf log10f powf sinhf tanf tanhf llvm-svn: 246186
* Revert r246175 to get builder green again.Lang Hames2015-08-2721-128/+11
| | | | llvm-svn: 246185
* [TableGen] Remove dead code. NFC.Ahmed Bougacha2015-08-271-7/+0
| | | | | | The only user of this was removed in r129670. llvm-svn: 246176
* Add Kaleidoscope regression tests.Lang Hames2015-08-2721-11/+128
| | | | | | These will be run if LLVM_BUILD_EXAMPLES is enabled. llvm-svn: 246175
* AMDGPU/SI: Add test for folding constants into operandsMatt Arsenault2015-08-271-0/+17
| | | | | | Patch by Axel Davy llvm-svn: 246167
* Revert r246158 since it breaks LLVM.Transforms/ConstProp.calls.llErik Schnetter2015-08-272-691/+78
| | | | llvm-svn: 246166
* Fix a case of `CHECK[^:]*$`.Jonathan Roelofs2015-08-271-2/+2
| | | | | | http://reviews.llvm.org/D11917 llvm-svn: 246163
* Enable constant propagation for more math functionsErik Schnetter2015-08-272-78/+691
| | | | | | | | | | | | Constant propagation for single precision math functions (such as tanf) is already working, but was not enabled. This patch enables these for many single-precision functions, and adds respective test cases. Newly handled functions: acosf asinf atanf atan2f ceilf coshf expf exp2f fabsf floorf fmodf logf log10f powf sinhf tanf tanhf llvm-svn: 246158
* [CMake] OBJLIB-ize *-tblgen.NAKAMURA Takumi2015-08-272-0/+17
| | | | | | | | | | | | This improves dependency chain of; (LLVMSupport && LLVMTableGen) && (*.cpp in *-tblgen) && (linking *-tblgen) with; (LLVMSupport && LLVMTableGen && *.cpp) && (linking *-tblgen) llvm-svn: 246156
* [LoopVectorize] Move test from r246149 into a target-specific folder to ↵Chad Rosier2015-08-271-0/+0
| | | | | | appease bots. llvm-svn: 246154
* [CMake] Let ExceptionDemo buildable with ENABLE_EH.NAKAMURA Takumi2015-08-272-5/+5
| | | | llvm-svn: 246152
* [llvm-readobj] Add support for dumping MachO min version load command.Davide Italiano2015-08-273-0/+45
| | | | | | | | | | | | | | | | | | Example output: File: <stdin> Format: Mach-O arm Arch: arm AddressSize: 32bit MinVersion { Cmd: LC_VERSION_MIN_IPHONEOS Size: 16 Version: 99.8.7 SDK: n/a } Differential Revision: http://reviews.llvm.org/D12373 llvm-svn: 246151
* [LoopVectorize] Add Support for Small Size Reductions.Chad Rosier2015-08-274-36/+393
| | | | | | | | | | | | | | | | | | | | | | | Unlike scalar operations, we can perform vector operations on element types that are smaller than the native integer types. We type-promote scalar operations if they are smaller than a native type (e.g., i8 arithmetic is promoted to i32 arithmetic on Arm targets). This patch detects and removes type-promotions within the reduction detection framework, enabling the vectorization of small size reductions. In the legality phase, we look through the ANDs and extensions that InstCombine creates during promotion, keeping track of the smaller type. In the profitability phase, we use the smaller type and ignore the ANDs and extensions in the cost model. Finally, in the code generation phase, we truncate the result of the reduction to allow InstCombine to rewrite the entire expression in the smaller type. This fixes PR21369. http://reviews.llvm.org/D12202 Patch by Matt Simpson <mssimpso@codeaurora.org>! llvm-svn: 246149
* [LoopVectorize] Extract InductionInfo into a helper class...James Molloy2015-08-274-139/+135
| | | | | | | | ... and move it into LoopUtils where it can be used by other passes, just like ReductionDescriptor. The API is very similar to ReductionDescriptor - that is, not very nice at all. Sorting these both out will come in a followup. NFC llvm-svn: 246145
* Whoops, remove trailing whitespace.Alex Rosenberg2015-08-271-1/+1
| | | | llvm-svn: 246141
* isKnownNonNull needs to consider globals in non-zero address spaces.Pete Cooper2015-08-272-2/+24
| | | | | | | | | Globals in address spaces other than one may have 0 as a valid address, so we should not assume that they can be null. Reviewed by Philip Reames. llvm-svn: 246137
* Allow value forwarding past release fences in EarlyCSEPhilip Reames2015-08-272-0/+97
| | | | | | | | | | | | A release fence acts as a publication barrier for stores within the current thread to become visible to other threads which might observe the release fence. It does not require the current thread to observe stores performed on other threads. As a result, we can allow store-load and load-store forwarding across a release fence. We do need to make sure that stores before the fence can't be eliminated even if there's another store to the same location after the fence. In theory, we could reorder the second store above the fence and *then* eliminate the former, but we can't do this if the stores are on opposite sides of the fence. Note: While more aggressive then what's there, this patch is still implementing a really conservative ordering. In particular, I'm not trying to exploit undefined behavior via races, or the fact that the LangRef says only 'atomic' accesses are ordered w.r.t. fences. Differential Revision: http://reviews.llvm.org/D11434 llvm-svn: 246134
* [RewriteStatepointsForGC] Reduce the number of new instructions for base ↵Philip Reames2015-08-275-21/+79
| | | | | | | | | | | | | | pointers When computing base pointers, we introduce new instructions to propagate the base of existing instructions which might not be bases. However, the algorithm doesn't make any effort to recognize when the new instruction to be inserted is the same as an existing one already in the IR. Since this is happening immediately before rewriting, we don't really have a chance to fix it after the pass runs without teaching loop passes about statepoints. I'm really not thrilled with this patch. I've rewritten it 4 different ways now, but this is the best I've come up with. The case where the new instruction is just the original base defining value could be merged into the existing algorithm with some complexity. The problem is that we might have something like an extractelement from a phi of two vectors. It may be trivially obvious that the base of the 0th element is an existing instruction, but I can't see how to make the algorithm itself figure that out. Thus, I resort to the call to SimplifyInstruction instead. Note that we can only adjust the instructions we've inserted ourselves. The live sets are still being tracked in side structures at this point in the code. We can't easily muck with instructions which might be in them. Long term, I'm really thinking we need to materialize the live pointer sets explicitly in the IR somehow rather than using side structures to track them. Differential Revision: http://reviews.llvm.org/D12004 llvm-svn: 246133
* Improved printing of analysis diagnostics in the loop vectorizer.Tyler Nowicki2015-08-272-20/+36
| | | | | | | | This patch ensures that every analysis diagnostic produced by the vectorizer will be printed if the loop has a vectorization hint on it. The condition has also been improved to prevent printing when a disabling hint is specified. llvm-svn: 246132
* Fixed a bug that edge weights are not assigned correctly when lowering ↵Cong Hou2015-08-272-1/+42
| | | | | | | | | | switch statement. This is a one-line-change patch that moves the update to UnhandledWeights to the correct position: it should be updated for all clusters instead of just range clusters. Differential Revision: http://reviews.llvm.org/D12391 llvm-svn: 246129
* Kaleidoscope: Prune unused libdeps.NAKAMURA Takumi2015-08-275-8/+0
| | | | llvm-svn: 246126
OpenPOWER on IntegriCloud