Eli Bendersky [Fri, 30 Nov 2012 14:22:14 +0000 (14:22 +0000)]
Clean up whitespace and add comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169002
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Fri, 30 Nov 2012 13:51:33 +0000 (13:51 +0000)]
Make FileCheck return 2 in case of an error as documented,
instead of 1 or true (?!)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169001
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 30 Nov 2012 13:28:31 +0000 (13:28 +0000)]
test/CodeGen/PowerPC: Add explicit -march=ppc32.
FIXME: Please add another RUN line if you would like to check also on ppc64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168999
91177308-0d34-0410-b5e6-
96231b3b80d8
Adhemerval Zanella [Fri, 30 Nov 2012 13:05:44 +0000 (13:05 +0000)]
This patch fixes the Altivec addend construction for the fused multiply-add
instruction (vmaddfp) to conform with IEEE to ensure the sign of a zero
result when resulting product is -0.0.
The -0.0 vector addend to vmaddfp is generated by a creating a vector
with full bits sets and then shifting each elements by 31-bits to the
left, resulting in a vector of 0x80000000 (or -0.0 as float).
The 'buildvec_canonicalize.ll' was adjusted to reflect this change and
the 'vec_mul.ll' was complemented with the float vector multiplication
test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168998
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 30 Nov 2012 12:12:20 +0000 (12:12 +0000)]
[msan] Tests for vector manipulation instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168997
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 30 Nov 2012 11:45:22 +0000 (11:45 +0000)]
Switch LLVM_USE_RVALUE_REFERENCES to LLVM_HAS_RVALUE_REFERENCES.
Rationale:
1) This was the name in the comment block. ;]
2) It matches Clang's __has_feature naming convention.
3) It matches other compiler-feature-test conventions.
Sorry for the noise. =]
I've also switch the comment block to use a \brief tag and not duplicate
the name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168996
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Fri, 30 Nov 2012 11:08:59 +0000 (11:08 +0000)]
[asan] simplify the code around doesNotReturn call. It now magically works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168995
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 30 Nov 2012 11:04:18 +0000 (11:04 +0000)]
Separate out the tests for whether the compiler suports R-value
references from whether it supports an R-value reference *this. No
version of GCC today supports the latter, which breaks GCC C++11
compiles of LLVM and Clang now.
Also add doxygen comments clarifying what's going on here, and update
the usage in Optional. I'll update the usages in Clang next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168993
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrik Hagglund [Fri, 30 Nov 2012 10:06:59 +0000 (10:06 +0000)]
More strict error checking in parseSpecifier + simplified code.
For example, don't allow empty strings to be passed to getInt.
Move asserts inside parseSpecifier. (One day we may want to pass parse
error messages to the user - from LLParser - instead of using asserts,
but keep the code simple until then. There have been an attempt to do
this. See r142288, which got reverted, and r142605.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168991
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 30 Nov 2012 09:34:29 +0000 (09:34 +0000)]
Fix non-determinism introduced in r168970 and pointed out by Duncan.
We're iterating over a non-deterministically ordered container looking
for two saturating flags. To do this correctly, we have to saturate
both, and only stop looping if both saturate to their final value.
Otherwise, which flag we see first changes the result.
This is also a micro-optimization of the previous version as now we
don't go into the (possibly expensive) test logic once the first
violation of either constraint is detected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168989
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 30 Nov 2012 09:26:25 +0000 (09:26 +0000)]
Rearrange the comments, control flow, and variable names; no
functionality changed.
Evan's commit r168970 moved the code that the primary comment in this
function referred to to the other end of the function without moving the
comment, and there has been a steady creep of "boolean" logic in it that
is simpler if handled via early exit. That way each special case can
have its own comments. I've also made the variable name a bit more
explanatory than "AllFit". This is in preparation to fix the
non-deterministic output of this function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168988
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 30 Nov 2012 06:47:06 +0000 (06:47 +0000)]
Add the rest of the experimental fission sections to MC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168986
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Fri, 30 Nov 2012 06:10:22 +0000 (06:10 +0000)]
Use multiclass for the store instructions with MEMri operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168983
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Fri, 30 Nov 2012 04:19:09 +0000 (04:19 +0000)]
Use multiclass for the load instructions with 'base + register offset'
addressing mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168976
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Fri, 30 Nov 2012 04:05:06 +0000 (04:05 +0000)]
Move library call simplification statistic to instcombine
The simplify-libcalls pass maintained a statistic to count the number
of library calls that have been simplified. Now that library call
simplification is being carried out in instcombine the statistic should
be moved to there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168975
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 30 Nov 2012 03:08:41 +0000 (03:08 +0000)]
Move the InstVisitor utility into VMCore where it belongs. It heavily
depends on the IR infrastructure, there is no sense in it being off in
Support land.
This is in preparation to start working to expand InstVisitor into more
special-purpose visitors that are still generic and can be re-used
across different passes. The expansion will go into the Analylis tree
though as nothing in VMCore needs it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168972
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 30 Nov 2012 02:02:42 +0000 (02:02 +0000)]
Fix logic to determine whether to turn a switch into a lookup table. When
the tables cannot fit in registers (i.e. bitmap), do not emit the table
if it's using an illegal type.
rdar://
12779436
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168970
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Briggs [Fri, 30 Nov 2012 00:44:47 +0000 (00:44 +0000)]
Modified dump() to provide a little
more information for dependences between
instructions that don't share a common loop.
Updated the test results appropriately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168965
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 30 Nov 2012 00:38:53 +0000 (00:38 +0000)]
Add a new C++11 compatibility macro, LLVM_LVALUE_FUNCTION.
This expands to '&', and is intended to be used when an /optional/ rvalue
override is available.
Before:
void foo() const { ... }
After:
void foo() const LLVM_LVALUE_FUNCTION { ... }
void foo() && { ... }
This is used to allow moving the contents of an Optional.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168963
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 29 Nov 2012 23:47:11 +0000 (23:47 +0000)]
Fixed the arm disassembly of invalid BFI instructions to not build a bad MCInst
which would then cause an assert when printed. rdar://
11437956
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168960
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 29 Nov 2012 22:56:13 +0000 (22:56 +0000)]
More comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168952
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 29 Nov 2012 21:58:47 +0000 (21:58 +0000)]
Update comment for malloc being a library call now, rather than an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168946
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Thu, 29 Nov 2012 21:25:12 +0000 (21:25 +0000)]
copyFastMathFlags utility and test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168943
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Thu, 29 Nov 2012 21:24:44 +0000 (21:24 +0000)]
Add a FileCheck test that makes sure two different CHECKs won't match the
same string
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168942
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 29 Nov 2012 21:17:26 +0000 (21:17 +0000)]
Update my email address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168941
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 29 Nov 2012 20:58:08 +0000 (20:58 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168937
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 29 Nov 2012 20:56:58 +0000 (20:56 +0000)]
Fix 80-column violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168936
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 29 Nov 2012 20:08:03 +0000 (20:08 +0000)]
Object: Pass the buffer name through when making a copy.
Should bring the buildbots back to life.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168935
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 29 Nov 2012 19:48:01 +0000 (19:48 +0000)]
Add cortex-a5 subtarget to the supported ARM architectures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168933
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Thu, 29 Nov 2012 19:42:09 +0000 (19:42 +0000)]
Cleanup recent addition of DAGTypeLegalizer::SplitVecOp_VSELECT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168932
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Thu, 29 Nov 2012 19:38:54 +0000 (19:38 +0000)]
rdar://
12100355 (part 1)
This revision attempts to recognize following population-count pattern:
while(a) { c++; ... ; a &= a - 1; ... },
where <c> and <a>could be used multiple times in the loop body.
TODO: On X8664 and ARM, __buildin_ctpop() are not expanded to a efficent
instruction sequence, which need to be improved in the following commits.
Reviewed by Nadav, really appreciate!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168931
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 29 Nov 2012 19:38:06 +0000 (19:38 +0000)]
Handle the situation where CodeGenPrepare removes a reference to a BB that has
the last invoke instruction in the function. This also removes the last landing
pad in an function. This is fine, but with SjLj EH code, we've already placed a
bunch of code in the 'entry' block, which expects the landing pad to stick
around.
When we get to the situation where CGP has removed the last landing pad, go
ahead and nuke the SjLj instructions from the 'entry' block.
<rdar://problem/
12721258>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168930
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Thu, 29 Nov 2012 19:35:44 +0000 (19:35 +0000)]
Use multiclass for 'transfer' instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168929
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 29 Nov 2012 19:28:29 +0000 (19:28 +0000)]
No need to run LICM after loop vectorization because we dont generate invariant code any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168928
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 29 Nov 2012 19:25:41 +0000 (19:25 +0000)]
When broadcasting invariant scalars into vectors, place the broadcast code in the preheader.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168927
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 29 Nov 2012 19:21:02 +0000 (19:21 +0000)]
Documentation for FileCheck: use 'option' and 'program' directives.
This enables option cross-referencing and now '--' in option names are no more turned into en dashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168926
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Thu, 29 Nov 2012 19:15:17 +0000 (19:15 +0000)]
instcombine: Migrate puts optimizations
This patch migrates the puts optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
All the simplifiers from simplify-libcalls have now been migrated to
instcombine. Yay! Just a few other bits to migrate (prototype attribute
inference and a few statistics) and simplify-libcalls can finally be put
to rest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168925
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 29 Nov 2012 19:14:35 +0000 (19:14 +0000)]
Documentation for llvm-link: reformat
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168924
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 29 Nov 2012 19:14:11 +0000 (19:14 +0000)]
Fix a memory leak in MachOObjectFile.
MachOObjectFile owns a MachOObj, but never frees it. Both MachOObjectFile
and MachOObj want to own the MemoryBuffer, though, so we have to be careful
and give them each one of their own.
Thanks to Greg Clayton, Eric Christopher and Michael Spencer for helping
figure out what's going wrong here.
rdar://
12561773
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168923
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 29 Nov 2012 19:10:21 +0000 (19:10 +0000)]
Documentation for llvm-cov: reformat
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168922
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 29 Nov 2012 19:07:57 +0000 (19:07 +0000)]
Follow up to 168711: It's safe to base this analysis on the found compare, just return the value for the right predicate.
Thanks to Andy for catching this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168921
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 29 Nov 2012 19:05:55 +0000 (19:05 +0000)]
Documentation for llvm-stress: reformat
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168920
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 29 Nov 2012 19:02:50 +0000 (19:02 +0000)]
Documentation for opt: reformat
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168919
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 29 Nov 2012 18:35:13 +0000 (18:35 +0000)]
Improve isImpliedCond comment a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168914
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 29 Nov 2012 18:27:01 +0000 (18:27 +0000)]
[ASan] Simplify check added in r168861. Bail out from module pass early if the module is blacklisted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168913
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 29 Nov 2012 18:16:11 +0000 (18:16 +0000)]
Documentation for llc: reformat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168912
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Thu, 29 Nov 2012 18:15:49 +0000 (18:15 +0000)]
Apply Takumi's patch to suppress unused-variable warnings in -Asserts builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168911
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 29 Nov 2012 18:14:24 +0000 (18:14 +0000)]
Add options to AddressSanitizer passes to make them configurable by frontend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168910
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Thu, 29 Nov 2012 18:09:37 +0000 (18:09 +0000)]
fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168909
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 29 Nov 2012 18:03:08 +0000 (18:03 +0000)]
Documentation for lit: more formatting: use 'option' and 'program' directives.
This enables cross-referencing and now '--' in option names are no more turned into en dashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168906
91177308-0d34-0410-b5e6-
96231b3b80d8
Pedro Artigas [Thu, 29 Nov 2012 17:47:05 +0000 (17:47 +0000)]
One more step towards making doInitialization and doFinalization useful for
start up and clean up module passes, now that ASAN and TSAN are fixed the
tests pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168905
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 29 Nov 2012 17:41:05 +0000 (17:41 +0000)]
Documentation for tblgen: formatting
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168904
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 29 Nov 2012 17:05:34 +0000 (17:05 +0000)]
Documentation for lit: formatting improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168902
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrik Hagglund [Thu, 29 Nov 2012 16:19:11 +0000 (16:19 +0000)]
Test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168899
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 29 Nov 2012 16:12:13 +0000 (16:12 +0000)]
Documentation: formatting improvements
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168897
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Thu, 29 Nov 2012 15:45:43 +0000 (15:45 +0000)]
instcombine: Migrate fputs optimizations
This patch migrates the fputs optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168893
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Thu, 29 Nov 2012 15:45:39 +0000 (15:45 +0000)]
instcombine: Migrate fwrite optimizations
This patch migrates the fwrite optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168892
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Thu, 29 Nov 2012 15:45:33 +0000 (15:45 +0000)]
instcombine: Migrate fprintf optimizations
This patch migrates the fprintf optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168891
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 29 Nov 2012 15:22:06 +0000 (15:22 +0000)]
[msan] Handle vector manipulation instructions.
Handle insertelement, extractelement, shufflevector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168889
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 29 Nov 2012 14:44:00 +0000 (14:44 +0000)]
[msan] Fix getOriginForNaryOp.
The old version failed on a 3-arg instruction with (-1, 0, 0) shadows (it would
pick the 3rd operand origin irrespective of its shadow).
The new version always picks the origin of the rightmost poisoned operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168887
91177308-0d34-0410-b5e6-
96231b3b80d8
Silviu Baranga [Thu, 29 Nov 2012 14:41:25 +0000 (14:41 +0000)]
Added atomic 64 min/max/umin/umax instrinsics support in the ARM backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168886
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 29 Nov 2012 14:36:26 +0000 (14:36 +0000)]
misched: Recompute priority queue when DFSResults are updated.
This was found by MSVC10's STL debug mode on a test from the test suite. Sadly
std::is_heap isn't standard so there is no way to assert this without writing
our own heap verify, which looks like overkill to me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168885
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 29 Nov 2012 14:32:03 +0000 (14:32 +0000)]
[msan] Basic handling of inline asm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168884
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Thu, 29 Nov 2012 14:26:28 +0000 (14:26 +0000)]
Teach the legalizer how to handle operands for VSELECT nodes
If we need to split the operand of a VSELECT, it must be the mask operand. We
split the entire VSELECT operand with EXTRACT_SUBVECTOR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168883
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Thu, 29 Nov 2012 14:26:24 +0000 (14:26 +0000)]
Allow targets to prefer TypeSplitVector over TypePromoteInteger when computing the legalization method for vectors
For some targets, it is desirable to prefer scalarizing <N x i1> instead of promoting to a larger legal type, such as <N x i32>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168882
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 29 Nov 2012 14:25:47 +0000 (14:25 +0000)]
[msan] Propagate shadow through (x<0) and (x>=0) comparisons.
This is a special case of signed relational comparison where result
only depends on the sign of x.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168881
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 29 Nov 2012 14:05:53 +0000 (14:05 +0000)]
[msan] Fix shadow & origin store & load alignment.
This change ensures that shadow memory accesses have the same alignment
as corresponding app memory accesses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168880
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 29 Nov 2012 13:43:05 +0000 (13:43 +0000)]
[msan] Optimize getOriginPtr.
Rewrite getOriginPtr in a way that lets subsequent optimizations factor out
the common part of Shadow and Origin address calculation. Improves perf by
up to 5%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168879
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 29 Nov 2012 13:12:03 +0000 (13:12 +0000)]
[msan] Fix a few compilation warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168878
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 29 Nov 2012 13:11:09 +0000 (13:11 +0000)]
[msan] Add a test for r168873.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168877
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 29 Nov 2012 12:49:04 +0000 (12:49 +0000)]
[msan] Transform memcpy and memset to library calls.
This was already done for memmove, where it is required for correctness.
This change improves performance by avoiding copyingthe same memory twice.
Also, the library functions are given __msan_ prefix to prevent instcombine
pass from converting them back to intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168876
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Thu, 29 Nov 2012 12:44:59 +0000 (12:44 +0000)]
I changed hasAVX() to hasFp256() and hasAVX2() to hasInt256() in X86IselLowering.cpp.
The logic was not changed, only names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168875
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 29 Nov 2012 12:43:56 +0000 (12:43 +0000)]
[msan] Update tests (broken in r168873).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168874
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 29 Nov 2012 12:30:18 +0000 (12:30 +0000)]
[msan] Make sure that report callbacks do not get merged.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168873
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 29 Nov 2012 12:00:32 +0000 (12:00 +0000)]
Documentation: use correct highlighter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168871
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 29 Nov 2012 09:57:20 +0000 (09:57 +0000)]
Initial commit of MemorySanitizer.
Compiler pass only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168866
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 29 Nov 2012 09:54:21 +0000 (09:54 +0000)]
[asan/tsan] initialize the asan/tsan callbacks in runOnFunction as opposed to doInitialization. This is required to allow the upcoming changes in PassManager behavior
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168864
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 29 Nov 2012 08:57:20 +0000 (08:57 +0000)]
[asan] when checking the noreturn attribute on the call, also check it on the callee
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168861
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Briggs [Thu, 29 Nov 2012 04:30:52 +0000 (04:30 +0000)]
Cleaned up a couple of comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168854
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 29 Nov 2012 03:34:17 +0000 (03:34 +0000)]
Use MCPhysReg for RegisterClassInfo allocation orders.
This saves a bit of memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168852
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 29 Nov 2012 02:39:28 +0000 (02:39 +0000)]
Add an MCPhysReg typedef to replace naked uint16_t.
Use this type for arrays of physical registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168850
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Thu, 29 Nov 2012 01:47:31 +0000 (01:47 +0000)]
Instruction::isAssociative() returns true for fmul/fadd if they are tagged "unsafe" mode.
Approved by: Eli and Michael.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168848
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 29 Nov 2012 00:26:11 +0000 (00:26 +0000)]
Avoid rewriting instructions twice.
This could cause miscompilations in targets where sub-register
composition is not always idempotent (ARM).
<rdar://problem/
12758887>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168837
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 29 Nov 2012 00:01:38 +0000 (00:01 +0000)]
Issue a fatal error if the line doesn't have a regular expression.
Also a couple not-user-visible changes; using empty() instead of size(), and
make inSection() not insert NULL Regex*'s into StringMap when doing a lookup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168833
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 29 Nov 2012 00:00:08 +0000 (00:00 +0000)]
When combining consecutive stores allow loads in between the stores, if the loads do not alias.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168832
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 28 Nov 2012 23:23:48 +0000 (23:23 +0000)]
When we delete a dead basic block, see if any of its successors are dead and
delete those as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168829
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Wed, 28 Nov 2012 21:40:54 +0000 (21:40 +0000)]
Documentation: improve formatting and remove unneeded empty lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168817
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Wed, 28 Nov 2012 21:21:18 +0000 (21:21 +0000)]
Whoops, fixed bad merge
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168816
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Wed, 28 Nov 2012 21:19:52 +0000 (21:19 +0000)]
Fixed bad test case
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168815
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Wed, 28 Nov 2012 21:17:34 +0000 (21:17 +0000)]
Fast-math: IRBuilder test for creating instructions with fast-math flags
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168814
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Wed, 28 Nov 2012 21:16:19 +0000 (21:16 +0000)]
Fast-math: Extend IRBuilder to have settable FastMathFlags to create instructions with
Also extended IRBuilder's documentation to mention the convenience state for DefaultFPMathTag and FastMathFlags that can be set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168812
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Wed, 28 Nov 2012 21:11:25 +0000 (21:11 +0000)]
Fast-math comments and convenience method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168811
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Wed, 28 Nov 2012 20:58:14 +0000 (20:58 +0000)]
Define signed const-ext immediate operands and their predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168810
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 28 Nov 2012 20:55:10 +0000 (20:55 +0000)]
ARM: Implement CanLowerReturn so large vectors get expanded into sret.
Fixes 14337.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168809
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 28 Nov 2012 19:13:06 +0000 (19:13 +0000)]
Make the LiveRegMatrix analysis available to targets.
No functional change, just moved header files.
Targets can inject custom passes between register allocation and
rewriting. This makes it possible to tweak the register allocation
before rewriting, using the full global interference checking available
from LiveRegMatrix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168806
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Wed, 28 Nov 2012 19:00:02 +0000 (19:00 +0000)]
Add backreference matching capabilities to Support/Regex, with
appropriate unit tests. This change in itself is not expected to
affect any functionality at this point, but it will serve as a
stepping stone to improve FileCheck's variable matching capabilities.
Luckily, our regex implementation already supports backreferences,
although a bit of hacking is required to enable it. It supports both
Basic Regular Expressions (BREs) and Extended Regular Expressions
(EREs), without supporting backrefs for EREs, following POSIX strictly
in this respect. And EREs is what we actually use (rightly). This is
contrary to many implementations (including the default on Linux) of
POSIX regexes, that do allow backrefs in EREs.
Adding backref support to our EREs is a very simple change in the
regcomp parsing code. I fail to think of significant cases where it
would clash with existing things, and can bring more versatility to
the regexes we write. There's always the danger of a backref in a
specially crafted regex causing exponential matching times, but since
we mainly use them for testing purposes I don't think it's a big
problem. [it can also be placed behind a flag specific to FileCheck,
if needed].
For more details, see:
* http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-November/055840.html
* http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
20121126/156878.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168802
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 28 Nov 2012 18:35:35 +0000 (18:35 +0000)]
MCJIT depends on JIT.
Unbreaks the CMake shared library build. This is nasty and should be fixed
eventually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168800
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Wed, 28 Nov 2012 18:21:03 +0000 (18:21 +0000)]
Fix initial frame state on powerpc64.
The createPPCMCAsmInfo routine used PPC::R1 as the initial frame
pointer register, but on PPC64 the 32-bit R1 register does not
have a corresponding DWARF number, causing invalid CIE initial
frame state to be emitted. Fix by using PPC::X1 instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168799
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrik Hägglund [Wed, 28 Nov 2012 14:32:52 +0000 (14:32 +0000)]
Fix warning. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168792
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrik Hägglund [Wed, 28 Nov 2012 12:13:12 +0000 (12:13 +0000)]
Add error handling in getInt.
Accordingly, update a testcase with a broken datalayout string.
Also, we never parse negative numbers, because '-' is used as a
separator. Therefore, use unsigned as result type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168785
91177308-0d34-0410-b5e6-
96231b3b80d8