Commit Graph

127293 Commits

Author SHA1 Message Date
Tim Shen
a750479355 [SelectionDAG] Eliminate exponential behavior in WalkChainUsers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259315 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-31 03:59:34 +00:00
Craig Topper
ac8a991748 No need to use utostr/utohexstr when writing into a raw_ostream. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259314 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-31 01:55:15 +00:00
Craig Topper
fef23f4125 Shrink character buffer size in raw_ostream::write_hex to 16 characters intead of 20 as that's the largest string a 64-bit hex value can be.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259313 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-31 01:12:38 +00:00
Craig Topper
ff0b4a2d25 Use std::end instead of repeating buffer sizes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259312 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-31 01:12:35 +00:00
Craig Topper
95769998f9 Convert int to Twine instead of using utostr since it was already being added to a Twine. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259308 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-31 00:15:35 +00:00
Jingyue Wu
e3e4ffd172 [doc] improve the doc for CUDA
1. Mentioned that CUDA support works best with trunk.
2. Simplified the example by removing its dependency on the CUDA samples.
3. Explain the --cuda-gpu-arch flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259307 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 23:48:47 +00:00
Derek Schuff
a2b61fb428 [WebAssembly] Fix uses of FrameIndex as store values
Previously the code assumed all uses of FI on loads and stores were as
addresses. This checks whether the use is the address or a value and
handles the latter case as it does for non-memory instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259306 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 21:43:08 +00:00
JF Bastien
cdfe27d1cc WebAssembly: don't optimize frameindex store
The previous code was incorrect (can't getReg a frameindex). We could instead optimize it to reduce tree height, but I'm not sure that's worthwhile yet because we then try to eliminate the frameindex.

This patch also fixes frame index elimination for operations which may load or store: it used to assume the base was operand 2 and immediate offset operand 1. That's not true for stores, where they're 4 and 3.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259305 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 14:11:26 +00:00
JF Bastien
5ca4b7cecc WebAssembly NFC: fix build warning
WebAssemblyFrameLowering.cpp:158:44: warning: enumeral and non-enumeral type in conditional expression [enabled by default]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259303 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 11:19:26 +00:00
Gerolf Hoflehner
729a217c15 [BasicAA] NFC - revised comment for function adjustToPointerSize()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259300 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 05:58:38 +00:00
Gerolf Hoflehner
86f53ba864 [BasicAA] Fix for missing must alias (D16343)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259299 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 05:52:53 +00:00
Gerolf Hoflehner
8326b169bc [BasicAA] Update on r259290 - added missing cast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259298 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 05:35:09 +00:00
Matt Arsenault
084a86c382 AMDGPU: Fix emitting invalid workitem intrinsics for HSA
The AMDGPUPromoteAlloca pass was emitting the read.local.size
calls, which with HSA was incorrectly selected to reading from
the offset mesa uses off of the kernarg pointer.

Error on intrinsics which aren't supported by HSA, and start
emitting the correct IR to read the workgroup size
out of the dispatch pointer.

Also initialize the pass so it can be tested with opt, and
start moving towards not depending on the subtarget as an
argument.

Start emitting errors for the intrinsics not handled with HSA.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259297 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 05:19:45 +00:00
Matt Arsenault
9a30bf46a7 AMDGPU: Stop checking intrinsics not used by HSA for dispatch-ptr
Only the dispatch.ptr intrinsic is supposed to be used now to get
the workgroup size, and the read.local.size intrinsics do not
work correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259296 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 05:10:59 +00:00
Matt Arsenault
0f1831aa7d InstCombine: fabs(x) * fabs(x) -> x * x
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259295 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 05:02:00 +00:00
Dan Gohman
af25d0139c [WebAssembly] Refine block placement to insert blocks between trees.
Refine the test for whether an instruction is in an expression tree so that
it detects when one tree ends and another begins, so we can place a block
at that point, rather than continuing to find the first instruction not in
a tree at all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259294 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 05:01:06 +00:00
Matt Arsenault
27e98d1c21 AMDGPU: Add new amdgcn workitem intrinsics
These use the correct prefix and follow the HSA naming convention
rather than the config register option names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259293 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 04:25:19 +00:00
Justin Bogner
b7fdaea278 Remove references to *.h.in files and some autoconf hackery
Missed this stuff in r259291.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259292 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 04:15:33 +00:00
Justin Bogner
53a4064102 Remove *.h.in - these were only used by the autoconf build system
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259291 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 04:05:45 +00:00
Gerolf Hoflehner
f6d75eeed4 [BasicAA] NFC - utility function for two's complement wrap-around
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259290 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 02:42:11 +00:00
Xinliang David Li
958f45c5b1 Further reduce test time
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259285 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 01:37:32 +00:00
Matthias Braun
5e08bd340a Avoid overly large SmallPtrSet/SmallSet
These sets perform linear searching in small mode so it is never a good
idea to use SmallSize/N bigger than 32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259283 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 01:24:31 +00:00
Matthias Braun
96c7162300 Use Support/DataTypes.h instead of cstdint
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259282 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 01:14:01 +00:00
Alexey Samsonov
af1aa14cb5 [docs] Remove references to autotools build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259280 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 01:10:15 +00:00
Justin Lebar
b31edea184 [CUDA] Die if we ask the NVPTX backend to emit a global ctor/dtor.
Summary: Previously we'd just silently skip these.

Reviewers: tra, jholewinski

Subscribers: llvm-commits, jhen, echristo,

Differential Revision: http://reviews.llvm.org/D16739

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259279 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 01:07:38 +00:00
David Majnemer
41a66df74f [CodeView] Properly handle empty line tables
Don't crash when there are no appropriate line table entries for a given
function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259277 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-30 00:36:09 +00:00
Manman Ren
77c763c1a3 [Objective-C] Support a new special module flag.
"Objective-C Class Properties" will be put into the objc_imageinfo struct.

rdar://23891898


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259270 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 23:51:00 +00:00
Davide Italiano
c98cfb2adf [llvm-nm] Add a comment to explain why we initialize MC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259266 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 23:38:05 +00:00
Kostya Serebryany
58b3c64b6b [libFuzzer] add -timeout_exitcode option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259265 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 23:30:07 +00:00
Sanjay Patel
2801207748 function names start with a lower case letter ; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259264 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 23:27:03 +00:00
Kostya Serebryany
fb614ec4d4 [libFuzzer] re-enable test for -abort_on_timeout=1, this time protecting from ASAN_OPTIONS set outside
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259263 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 23:19:00 +00:00
Sanjay Patel
62d61909e4 fix formatting; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259262 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 23:14:58 +00:00
Fiona Glaser
d7541ec848 Fix typo in LoopSimplifyCFG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259261 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 23:12:52 +00:00
Vedant Kumar
0c94d7d441 [Profiling] Add a -sparse mode to llvm-profdata merge
Add an option to llvm-profdata merge for writing out sparse indexed
profiles. These profiles omit InstrProfRecords for functions which are
never executed.

Differential Revision: http://reviews.llvm.org/D16727

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259258 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 22:54:45 +00:00
Reid Kleckner
2e10304d4f Fix the MSVC build by moving static asserts into constructors
Apparently MSVC won't allow you to ask for the sizeof() a data member at
class scope.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259257 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 22:40:22 +00:00
Fiona Glaser
e98524387e Add LoopSimplifyCFG pass
Loop transformations can sometimes fail because the loop, while in
valid rotated LCSSA form, is not in a canonical CFG form. This is
an extremely simple pass that just merges obviously redundant
blocks, which can be used to fix some known failure cases. In the
future, it may be enhanced with more cases (and have code shared with
SimplifyCFG).

This allows us to run LoopSimplifyCFG -> LoopRotate -> LoopUnroll,
so that SimplifyCFG cleans up the loop before Rotate tries to run.

Not currently used in the pass manager, since this pass doesn't do
anything unless you can hook it up in an LPM with other loop passes.
It'll be added once Chandler cleans up things to allow this.

Tested in a custom pipeline out of tree to confirm it works in
practice (in addition to the included trivial test).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259256 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 22:35:36 +00:00
Matthias Braun
7448ec5a3d Need #include <cstdint> for uint64_t
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259255 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 22:35:29 +00:00
Matthias Braun
62c2e3cdee Need #include <climit> for CHAR_BIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259254 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 22:30:30 +00:00
Xinliang David Li
d127388ad8 Improve test speed/trial 2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259253 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 22:29:15 +00:00
Matthias Braun
1a0e291e60 AttributeSetImpl: Summarize existing function attributes in a bitset.
The majority of attribute queries checks for the existence of an enum
attribute in the FunctionIndex slot. We only have 48 of those and can
therefore summarize them in an uint64_t bitset which measurably improves
compile time.

Differential Revision: http://reviews.llvm.org/D16618

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259252 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 22:25:19 +00:00
Matthias Braun
a5c14e4492 AttributeSetNode: Summarize existing attributes in a bitset.
The majority of queries just checks for the existince of an enum
attribute.  We only have 48 of those and can summaryiz them in an
uint64_t bitfield so we can avoid searching the list. This improves
"opt" compile time by 1-4% in my measurements.

Differential Revision: http://reviews.llvm.org/D16617

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259251 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 22:25:13 +00:00
Xinliang David Li
1626c62205 Revert 259242, 259243 -- irrelvante changes pulled in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259244 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 21:26:31 +00:00
Xinliang David Li
0964903e2c Use range for loop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259243 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 21:23:47 +00:00
Xinliang David Li
fd32fbe9a5 Improve test speed (interchange loop, reducing padding)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259242 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 21:13:55 +00:00
Yaron Keren
55307987a1 Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment.
clang part in r259232, this is the LLVM part of the patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259240 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 20:50:44 +00:00
Sanjay Patel
b17df8b4d7 [InstCombine] avoid an insertelement transformation that induces the opposite extractelement fold (PR26354)
We would infinite loop because we created a shufflevector that was wider than
needed and then failed to combine that with the insertelement. When subsequently
visiting the extractelement from that shuffle, we see that it's unnecessary,
delete it, and trigger another visit to the insertelement.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259236 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 20:21:02 +00:00
David Majnemer
3a1ed8c7cb Unbreak windows buildbots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259231 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 19:38:03 +00:00
David Majnemer
5c900cb299 [CodeView] Implement .cv_inline_linetable
This support is _very_ rudimentary, just enough to get some basic data
into the CodeView debug section.

Left to do is:
- Use the combined opcodes to save space.
- Do something about code offsets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259230 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 19:24:12 +00:00
Tim Northover
b226159d1c ARM: don't mangle DAG constant if it has more than one use
The basic optimisation was to convert (mul $LHS, $complex_constant) into
roughly "(shl (mul $LHS, $simple_constant), $simple_amt)" when it was expected
to be cheaper. The original logic checks that the mul only has one use (since
we're mangling $complex_constant), but when used in even more complex
addressing modes there may be an outer addition that can pick up the wrong
value too.

I *think* the ARM addressing-mode problem is actually unreachable at the
moment, but that depends on complex assessments of the profitability of
pre-increment addressing modes so I've put a real check in there instead of an
assertion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259228 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 19:18:46 +00:00
Derek Schuff
a42f385f92 [WebAssembly] Update test expectations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259223 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-29 18:54:38 +00:00