Commit Graph

221341 Commits

Author SHA1 Message Date
Derek Schuff c97ba939d1 [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.

llvm-svn: 259306
2016-01-30 21:43:08 +00:00
JF Bastien fbc89d21dd 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.

llvm-svn: 259305
2016-01-30 14:11:26 +00:00
Benjamin Kramer 6e75b138f2 [AST] Pull simple method inline.
llvm-svn: 259304
2016-01-30 12:16:23 +00:00
JF Bastien 3ca3ea690f WebAssembly NFC: fix build warning
WebAssemblyFrameLowering.cpp:158:44: warning: enumeral and non-enumeral type in conditional expression [enabled by default]

llvm-svn: 259303
2016-01-30 11:19:26 +00:00
Davide Italiano 04839a59f2 assert(false) -> llvm_unreachable().
llvm-svn: 259302
2016-01-30 08:03:54 +00:00
Ismail Donmez 7bf46bfcdf Fix build with VS2015
llvm-svn: 259301
2016-01-30 07:14:31 +00:00
Gerolf Hoflehner d24671f880 [BasicAA] NFC - revised comment for function adjustToPointerSize()
llvm-svn: 259300
2016-01-30 05:58:38 +00:00
Gerolf Hoflehner 87ddb65fa6 [BasicAA] Fix for missing must alias (D16343)
llvm-svn: 259299
2016-01-30 05:52:53 +00:00
Gerolf Hoflehner 73fc84bfe9 [BasicAA] Update on r259290 - added missing cast
llvm-svn: 259298
2016-01-30 05:35:09 +00:00
Matt Arsenault e013246462 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.

llvm-svn: 259297
2016-01-30 05:19:45 +00:00
Matt Arsenault d0799df707 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.

llvm-svn: 259296
2016-01-30 05:10:59 +00:00
Matt Arsenault 56c079f393 InstCombine: fabs(x) * fabs(x) -> x * x
llvm-svn: 259295
2016-01-30 05:02:00 +00:00
Dan Gohman ed0f113885 [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.

llvm-svn: 259294
2016-01-30 05:01:06 +00:00
Matt Arsenault 43976df0da AMDGPU: Add new amdgcn workitem intrinsics
These use the correct prefix and follow the HSA naming convention
rather than the config register option names.

llvm-svn: 259293
2016-01-30 04:25:19 +00:00
Justin Bogner 4bc4b5f4b8 Remove references to *.h.in files and some autoconf hackery
Missed this stuff in r259291.

llvm-svn: 259292
2016-01-30 04:15:33 +00:00
Justin Bogner 0138037203 Remove *.h.in - these were only used by the autoconf build system
llvm-svn: 259291
2016-01-30 04:05:45 +00:00
Gerolf Hoflehner 1d1fbb52e3 [BasicAA] NFC - utility function for two's complement wrap-around
llvm-svn: 259290
2016-01-30 02:42:11 +00:00
NAKAMURA Takumi 622f3dcd1d test/clang-tidy/performance-for-range-copy.cpp: Appease for targeting ms mode.
llvm-svn: 259289
2016-01-30 02:15:19 +00:00
Devin Coughlin 4be27d4db9 [analyzer] Make suppression of macro defensive checks work with -analyzer-eagerly-assume.
This is the default for the analyzer but the flag is added by the driver so
our suppression tests didn't cover this case.

llvm-svn: 259288
2016-01-30 01:59:33 +00:00
Argyrios Kyrtzidis b4030df780 [SemaCXX] Fix crash-on-invalid while trying to deduce return type of a lambda.
rdar://22032373

llvm-svn: 259287
2016-01-30 01:51:20 +00:00
Xinliang David Li fe28ccc98f Further reduce test time
llvm-svn: 259285
2016-01-30 01:37:32 +00:00
Matthias Braun 1d03007774 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.

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

llvm-svn: 259284
2016-01-30 01:27:06 +00:00
Matthias Braun b30f2f5141 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.

llvm-svn: 259283
2016-01-30 01:24:31 +00:00
Matthias Braun daa812d518 Use Support/DataTypes.h instead of cstdint
llvm-svn: 259282
2016-01-30 01:14:01 +00:00
Alexey Samsonov f094e0f3e3 [docs] Remove references to autoconf build.
llvm-svn: 259281
2016-01-30 01:11:42 +00:00
Alexey Samsonov f18fba6d96 [docs] Remove references to autotools build.
llvm-svn: 259280
2016-01-30 01:10:15 +00:00
Justin Lebar ead59f4765 [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

llvm-svn: 259279
2016-01-30 01:07:38 +00:00
Alexey Samsonov 433c43cd85 Remove references to autotools build.
llvm-svn: 259278
2016-01-30 00:54:42 +00:00
David Majnemer 8b68a6cabd [CodeView] Properly handle empty line tables
Don't crash when there are no appropriate line table entries for a given
function.

llvm-svn: 259277
2016-01-30 00:36:09 +00:00
Rui Ueyama 3c8d049d88 Move template instantiations to end of the file.
llvm-svn: 259276
2016-01-29 23:59:15 +00:00
Ekaterina Romanova 0e19cf2dd8 This patch adds doxygen comments for the intrinsincs in the header file __wmmintrin_aes.h.
The doxygen comments are automatically generated based on Sony's intrinsics document.

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

llvm-svn: 259275
2016-01-29 23:59:00 +00:00
Rui Ueyama cf375935a9 Update comments about the entries in .got.plt.
The original comments were a bit inaccurate because there was no 4 addends.

llvm-svn: 259274
2016-01-29 23:58:03 +00:00
Vedant Kumar a06e8ca6c5 [profile] Support hostname expansion in LLVM_PROFILE_FILE
This patch adds support for expanding "%h" out to the machine hostname
in the LLVM_PROFILE_FILE environment variable.

Patch by Daniel Waters!

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

llvm-svn: 259272
2016-01-29 23:52:11 +00:00
Richard Trieu dcb5557f2d Improve -Wconstant-conversion
Switch the evaluation from isIntegerConstantExpr to EvaluateAsInt.
EvaluateAsInt will evaluate more types of expressions than
isIntegerConstantExpr.

Move one case from -Wsign-conversion to -Wconstant-conversion.  The case is:
1) Source and target types are signed
2) Source type is wider than the target type
3) The source constant value is positive
4) The conversion will store the value as negative in the target.

llvm-svn: 259271
2016-01-29 23:51:16 +00:00
Manman Ren c77e0ff785 [Objective-C] Support a new special module flag.
"Objective-C Class Properties" will be put into the objc_imageinfo struct.

rdar://23891898

llvm-svn: 259270
2016-01-29 23:51:00 +00:00
Manman Ren ce7bff5e7f Class Property: generate metadata for class properties in protocols.
The list of class properties is saved in
Old ABI: protocol->ext->class_properties (protocol->ext->size will be updated)
New ABI: protocol->class_properties (protocol->size will be updated)

rdar://23891898

llvm-svn: 259268
2016-01-29 23:46:55 +00:00
Manman Ren 96df0b33f6 Class Property: generate metadata for class properties in categories.
The list of class properties is saved in
Old ABI: category->class_properties (category->size will be updated as well)
New ABI: category->class_properties (a flag in objc_image_info to indicate
         whether or not the list of class properties is present)

rdar://23891898

llvm-svn: 259267
2016-01-29 23:45:01 +00:00
Davide Italiano 63634cb0bc [llvm-nm] Add a comment to explain why we initialize MC.
llvm-svn: 259266
2016-01-29 23:38:05 +00:00
Kostya Serebryany 54a6363a8f [libFuzzer] add -timeout_exitcode option
llvm-svn: 259265
2016-01-29 23:30:07 +00:00
Sanjay Patel 6038d3e5c6 function names start with a lower case letter ; NFC
llvm-svn: 259264
2016-01-29 23:27:03 +00:00
Kostya Serebryany 085ca4131f [libFuzzer] re-enable test for -abort_on_timeout=1, this time protecting from ASAN_OPTIONS set outside
llvm-svn: 259263
2016-01-29 23:19:00 +00:00
Sanjay Patel f9f5d3cc45 fix formatting; NFC
llvm-svn: 259262
2016-01-29 23:14:58 +00:00
Fiona Glaser 36e8230db0 Fix typo in LoopSimplifyCFG
llvm-svn: 259261
2016-01-29 23:12:52 +00:00
Alexey Samsonov 7f5b2d0ac8 [UBSan] Add documentation for runtime issue suppression.
llvm-svn: 259260
2016-01-29 23:07:14 +00:00
Rui Ueyama 8364c6269a Add comments on a mysterious value in MIPS GOT[1].
Thanks to Simon Atanasyan and Igor Kudrin for describing the code!

llvm-svn: 259259
2016-01-29 22:55:38 +00:00
Vedant Kumar 00dab22853 [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

llvm-svn: 259258
2016-01-29 22:54:45 +00:00
Reid Kleckner b046154ae9 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.

llvm-svn: 259257
2016-01-29 22:40:22 +00:00
Fiona Glaser b417d464e6 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).

llvm-svn: 259256
2016-01-29 22:35:36 +00:00
Matthias Braun 9c98105002 Need #include <cstdint> for uint64_t
llvm-svn: 259255
2016-01-29 22:35:29 +00:00
Matthias Braun d520d4ecd2 Need #include <climit> for CHAR_BIT
llvm-svn: 259254
2016-01-29 22:30:30 +00:00