oota-llvm.git
12 years agoPR11642 has been fixed, enable -fvisibility-inlines-hidden everywhere.
Rafael Espindola [Tue, 27 Dec 2011 21:37:11 +0000 (21:37 +0000)]
PR11642 has been fixed, enable -fvisibility-inlines-hidden everywhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147296 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSwitch StringMap from an array of structures to a structure of arrays.
Benjamin Kramer [Tue, 27 Dec 2011 20:35:07 +0000 (20:35 +0000)]
Switch StringMap from an array of structures to a structure of arrays.

- -25% memory usage of the main table on x86_64 (was wasted in struct padding).
- no significant performance change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147294 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUse false not zero, as a bool.
Nick Lewycky [Tue, 27 Dec 2011 18:27:22 +0000 (18:27 +0000)]
Use false not zero, as a bool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147292 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTurn cos(-x) into cos(x). Patch by Alexander Malyshev!
Nick Lewycky [Tue, 27 Dec 2011 18:25:50 +0000 (18:25 +0000)]
Turn cos(-x) into cos(x). Patch by Alexander Malyshev!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147291 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoClean up some Release build warnings.
Benjamin Kramer [Tue, 27 Dec 2011 11:41:05 +0000 (11:41 +0000)]
Clean up some Release build warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147289 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd handling of x86_avx2_pmovmskb to computeMaskedBitsForTargetNode for consistency...
Craig Topper [Tue, 27 Dec 2011 06:27:23 +0000 (06:27 +0000)]
Add handling of x86_avx2_pmovmskb to computeMaskedBitsForTargetNode for consistency. Add comments and an assert for BMI instructions to PerformXorCombine since the enabling of the combine is conditional on it, but the function itself isn't.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147287 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTeach simplifycfg to recompute branch weights when merging some branches, and
Nick Lewycky [Tue, 27 Dec 2011 04:31:52 +0000 (04:31 +0000)]
Teach simplifycfg to recompute branch weights when merging some branches, and
to discard weights when appropriate. Still more to do (and a new TODO), but
it's a start!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147286 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUsing Inst->setMetadata(..., NULL) should be safe to remove metadata even when
Nick Lewycky [Tue, 27 Dec 2011 01:17:40 +0000 (01:17 +0000)]
Using Inst->setMetadata(..., NULL) should be safe to remove metadata even when
there is non of that type to remove. This fixes a crasher in the particular
case where the instruction has metadata but no metadata storage in the context
(this is only possible if the instruction has !dbg but no other metadata info).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147285 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix warning.
Rafael Espindola [Mon, 26 Dec 2011 23:12:42 +0000 (23:12 +0000)]
Fix warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147284 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake sure DAGCombiner doesn't introduce multiple loads from the same memory location...
Eli Friedman [Mon, 26 Dec 2011 22:49:32 +0000 (22:49 +0000)]
Make sure DAGCombiner doesn't introduce multiple loads from the same memory location.  PR10747, part 2.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147283 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUpdate the branch weight metadata when reversing the order of a branch.
Nick Lewycky [Mon, 26 Dec 2011 20:54:14 +0000 (20:54 +0000)]
Update the branch weight metadata when reversing the order of a branch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147280 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSort includes, canonicalize whitespace, fix typos. No functionality change.
Nick Lewycky [Mon, 26 Dec 2011 20:37:40 +0000 (20:37 +0000)]
Sort includes, canonicalize whitespace, fix typos. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147279 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUpdate the LangRef documentation: the codegen does support this instruction.
Nadav Rotem [Sun, 25 Dec 2011 21:32:35 +0000 (21:32 +0000)]
Update the LangRef documentation: the codegen does support this instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147274 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix a typo in the widening of vectors in PromoteIntRes. Patch by Shemer Anat.
Nadav Rotem [Sun, 25 Dec 2011 20:01:38 +0000 (20:01 +0000)]
Fix a typo in the widening of vectors in PromoteIntRes. Patch by Shemer Anat.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147272 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSparc: Implement emitFrameIndexDebugValue and getDebugValue Location hooks.
Venkatraman Govindaraju [Sun, 25 Dec 2011 18:50:24 +0000 (18:50 +0000)]
Sparc: Implement emitFrameIndexDebugValue and getDebugValue Location hooks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147269 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd braces to remove silly warning.
Bill Wendling [Sun, 25 Dec 2011 06:56:22 +0000 (06:56 +0000)]
Add braces to remove silly warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147264 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove unused variables.
Rafael Espindola [Sun, 25 Dec 2011 01:20:19 +0000 (01:20 +0000)]
Remove unused variables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147261 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd an explicit test that we now fold cttz.i32(..., true) >> 5 -> 0.
Chandler Carruth [Sat, 24 Dec 2011 22:34:15 +0000 (22:34 +0000)]
Add an explicit test that we now fold cttz.i32(..., true) >> 5 -> 0.
This is a result of Benjamin's work on ValueTracking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147259 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoInstCombine: Add a combine that turns (2^n)-1 ^ x back into (2^n)-1 - x iff x is...
Benjamin Kramer [Sat, 24 Dec 2011 17:31:53 +0000 (17:31 +0000)]
InstCombine: Add a combine that turns (2^n)-1 ^ x back into (2^n)-1 - x iff x is smaller than 2^n and it fuses with a following add.

This was intended to undo the sub canonicalization in cases where it's not profitable, but it also
finds some cases on it's own.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147256 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoComputeMaskedBits: Make knownzero computation more aggressive for ctlz with undef...
Benjamin Kramer [Sat, 24 Dec 2011 17:31:46 +0000 (17:31 +0000)]
ComputeMaskedBits: Make knownzero computation more aggressive for ctlz with undef zero.

unsigned foo(unsigned x) { return 31 - __builtin_clz(x); }
now compiles into a single "bsrl" instruction on x86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147255 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoInstCombine: Canonicalize (2^n)-1 - x into (2^n)-1 ^ x iff x is known to be smaller...
Benjamin Kramer [Sat, 24 Dec 2011 17:31:38 +0000 (17:31 +0000)]
InstCombine: Canonicalize (2^n)-1 - x into (2^n)-1 ^ x iff x is known to be smaller than 2^n.

This has the obvious advantage of being commutable and is always a win on x86 because
const - x wastes a register there. On less weird architectures this may lead to
a regression because other arithmetic doesn't fuse with it anymore. I'll address that
problem in a followup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147254 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSection relative fixups are a coff concept, not a x86 one. Replace the
Rafael Espindola [Sat, 24 Dec 2011 14:47:52 +0000 (14:47 +0000)]
Section relative fixups are a coff concept, not a x86 one. Replace the
x86 specific reloc_coff_secrel32 with a generic FK_SecRel_4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147252 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUse standard promotion for i8 CTTZ nodes and i8 CTLZ nodes when the
Chandler Carruth [Sat, 24 Dec 2011 12:12:34 +0000 (12:12 +0000)]
Use standard promotion for i8 CTTZ nodes and i8 CTLZ nodes when the
LZCNT instructions are available. Force promotion to i32 to get
a smaller encoding since the fix-ups necessary are just as complex for
either promoted type

We can't do standard promotion for CTLZ when lowering through BSR
because it results in poor code surrounding the 'xor' at the end of this
instruction. Essentially, if we promote the entire CTLZ node to i32, we
end up doing the xor on a 32-bit CTLZ implementation, and then
subtracting appropriately to get back to an i8 value. Instead, our
custom logic just uses the knowledge of the incoming size to compute
a perfect xor. I'd love to know of a way to fix this, but so far I'm
drawing a blank. I suspect the legalizer could be more clever and/or it
could collude with the DAG combiner, but how... ;]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147251 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd systematic testing for cttz as well, and fix the bug I spotted by
Chandler Carruth [Sat, 24 Dec 2011 11:46:10 +0000 (11:46 +0000)]
Add systematic testing for cttz as well, and fix the bug I spotted by
inspection earlier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147250 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd i8 and i64 testing for ctlz on x86. Also simplify the i16 test.
Chandler Carruth [Sat, 24 Dec 2011 11:26:59 +0000 (11:26 +0000)]
Add i8 and i64 testing for ctlz on x86. Also simplify the i16 test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147249 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTidy up this rather crufty test. Put the declarations at the top to make
Chandler Carruth [Sat, 24 Dec 2011 11:26:57 +0000 (11:26 +0000)]
Tidy up this rather crufty test. Put the declarations at the top to make
my C-brain happy. Remove the unnecessary bits of pedantic IR fluff like
nounwind. Remove stray uses comments. Name things semantically rather
than tN so that adding a new test in the middle doesn't cause pain, and
so that new tests can be grouped semantically.

This exposes how little systematic testing is going on here. I noticed
this by finding several bugs via inspection and wondering why this test
wasn't catching any of them. =[

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147248 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoChandler fixed this.
Benjamin Kramer [Sat, 24 Dec 2011 11:23:32 +0000 (11:23 +0000)]
Chandler fixed this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147247 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoExpand more when we have a nice 'tzcnt' instruction, to avoid generating
Chandler Carruth [Sat, 24 Dec 2011 11:11:38 +0000 (11:11 +0000)]
Expand more when we have a nice 'tzcnt' instruction, to avoid generating
'bsf' instructions here.

This one is actually debatable to my eyes. It's not clear that any chip
implementing 'tzcnt' would have a slow 'bsf' for any reason, and unless
EFLAGS or a zero input matters, 'tzcnt' is just a longer encoding.
Still, this restores the old behavior with 'tzcnt' enabled for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147246 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTidy up some of these tests.
Chandler Carruth [Sat, 24 Dec 2011 11:11:36 +0000 (11:11 +0000)]
Tidy up some of these tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147245 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSwitch the lowering of CTLZ_ZERO_UNDEF from a .td pattern back to the
Chandler Carruth [Sat, 24 Dec 2011 10:55:54 +0000 (10:55 +0000)]
Switch the lowering of CTLZ_ZERO_UNDEF from a .td pattern back to the
X86ISelLowering C++ code. Because this is lowered via an xor wrapped
around a bsr, we want the dagcombine which runs after isel lowering to
have a chance to clean things up. In particular, it is very common to
see code which looks like:

  (sizeof(x)*8 - 1) ^ __builtin_clz(x)

Which is trying to compute the most significant bit of 'x'. That's
actually the value computed directly by the 'bsr' instruction, but if we
match it too late, we'll get completely redundant xor instructions.

The more naive code for the above (subtracting rather than using an xor)
still isn't handled correctly due to the dagcombine getting confused.

Also, while here fix an issue spotted by inspection: we should have been
expanding the zero-undef variants to the normal variants when there is
an 'lzcnt' instruction. Do so, and test for this. We don't want to
generate unnecessary 'bsr' instructions.

These two changes fix some regressions in encoding and decoding
benchmarks. However, there is still a *lot* to be improve on in this
type of code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147244 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoCleanup this test a bit, sorting things and grouping them more clearly.
Chandler Carruth [Sat, 24 Dec 2011 10:55:42 +0000 (10:55 +0000)]
Cleanup this test a bit, sorting things and grouping them more clearly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147243 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix Comments.
Jakob Stoklund Olesen [Sat, 24 Dec 2011 04:17:01 +0000 (04:17 +0000)]
Fix Comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147238 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd MachineMemOperands to instructions generated in storeRegToStackSlot or
Akira Hatanaka [Sat, 24 Dec 2011 03:11:18 +0000 (03:11 +0000)]
Add MachineMemOperands to instructions generated in storeRegToStackSlot or
loadRegFromStackSlot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147235 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDetect unaligned loads/stores that have been added for Mips64 support.
Akira Hatanaka [Sat, 24 Dec 2011 03:07:37 +0000 (03:07 +0000)]
Detect unaligned loads/stores that have been added for Mips64 support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147234 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTest case for r147232.
Akira Hatanaka [Sat, 24 Dec 2011 03:05:43 +0000 (03:05 +0000)]
Test case for r147232.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147233 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoIf target ABI is N64, LEA should be daddiu.
Akira Hatanaka [Sat, 24 Dec 2011 02:59:27 +0000 (02:59 +0000)]
If target ABI is N64, LEA should be daddiu.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147232 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove x86 specific bits of the COFF writer to lib/Target/X86.
Rafael Espindola [Sat, 24 Dec 2011 02:14:02 +0000 (02:14 +0000)]
Move x86 specific bits of the COFF writer to lib/Target/X86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147231 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoDefine trivial destructor inline.
Rafael Espindola [Sat, 24 Dec 2011 01:53:13 +0000 (01:53 +0000)]
Define trivial destructor inline.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147230 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake GetRelocType pure virtual.
Rafael Espindola [Sat, 24 Dec 2011 01:36:25 +0000 (01:36 +0000)]
Make GetRelocType pure virtual.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147229 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix typo "infinte".
Nick Lewycky [Fri, 23 Dec 2011 23:49:25 +0000 (23:49 +0000)]
Fix typo "infinte".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147226 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove this test from date-name to feature-name, and port it to FileCheck.
Nick Lewycky [Fri, 23 Dec 2011 18:41:31 +0000 (18:41 +0000)]
Move this test from date-name to feature-name, and port it to FileCheck.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147223 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoWhen not destroying the source, the linker is not remapping the types. Added support
Mon P Wang [Fri, 23 Dec 2011 02:18:32 +0000 (02:18 +0000)]
When not destroying the source, the linker is not remapping the types. Added support
to CloneFunctionInto to allow remapping for this case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147217 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUse 'check_symbol_exists' instead of 'check_function_exists' for finding isatty....
Ted Kremenek [Fri, 23 Dec 2011 01:31:45 +0000 (01:31 +0000)]
Use 'check_symbol_exists' instead of 'check_function_exists' for finding isatty.  This change allows Xcode generated projects to have HAVE_ISATTY to be properly defined.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147215 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoExperimental support for aligned NEON spills.
Jakob Stoklund Olesen [Fri, 23 Dec 2011 00:36:18 +0000 (00:36 +0000)]
Experimental support for aligned NEON spills.

ARM targets with NEON units have access to aligned vector loads and
stores that are potentially faster than unaligned operations.

Add support for spilling the callee-saved NEON registers to an aligned
stack area using 16-byte aligned NEON loads and store.

This feature is off by default, controlled by an -align-neon-spills
command line option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147211 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd variants of the dispatchsetup pseudo for Thumb and !VFP. <rdar://10620138>
Bob Wilson [Thu, 22 Dec 2011 23:39:48 +0000 (23:39 +0000)]
Add variants of the dispatchsetup pseudo for Thumb and !VFP. <rdar://10620138>

My change r146949 added register clobbers to the eh_sjlj_dispatchsetup pseudo
instruction, but on Thumb1 some of those registers cannot be used.  This
caused massive failures on the testsuite when compiling for Thumb1.  While
fixing that, I noticed that the eh_sjlj_setjmp instruction has a "nofp"
variant, and I realized that dispatchsetup needs the same thing, so I have
added that as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147204 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTableGen: add a comment
Dylan Noblesmith [Thu, 22 Dec 2011 23:16:09 +0000 (23:16 +0000)]
TableGen: add a comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147199 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agotry to fix MSVC build
Dylan Noblesmith [Thu, 22 Dec 2011 23:08:39 +0000 (23:08 +0000)]
try to fix MSVC build

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147198 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agodrop unneeded config.h includes
Dylan Noblesmith [Thu, 22 Dec 2011 23:04:07 +0000 (23:04 +0000)]
drop unneeded config.h includes

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147197 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAttempt #2 to fix mingw crossbuild. This time with more ugly hacks!
Benjamin Kramer [Thu, 22 Dec 2011 22:50:44 +0000 (22:50 +0000)]
Attempt #2 to fix mingw crossbuild. This time with more ugly hacks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147196 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix 80-column violations.
Chad Rosier [Thu, 22 Dec 2011 22:35:21 +0000 (22:35 +0000)]
Fix 80-column violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147192 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake the -fvisibility-inlines-hidden check more thorough in a hopeless attempt to...
Benjamin Kramer [Thu, 22 Dec 2011 22:25:26 +0000 (22:25 +0000)]
Make the -fvisibility-inlines-hidden check more thorough in a hopeless attempt to fix mingw cross-compiles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147191 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove all the dependencies on X86FixupKinds.h to a single method in preparation
Rafael Espindola [Thu, 22 Dec 2011 22:21:47 +0000 (22:21 +0000)]
Move all the dependencies on X86FixupKinds.h to a single method in preparation
to moving it to lib/Target/X86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147190 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoARM VFP assembly parsing and encoding for VCVT(float <--> fixed point).
Jim Grosbach [Thu, 22 Dec 2011 22:19:05 +0000 (22:19 +0000)]
ARM VFP assembly parsing and encoding for VCVT(float <--> fixed point).

rdar://10558523

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147189 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd missing usesCustomInserter flag on Int_eh_sjlj_setjmp_nofp.
Bob Wilson [Thu, 22 Dec 2011 22:12:44 +0000 (22:12 +0000)]
Add missing usesCustomInserter flag on Int_eh_sjlj_setjmp_nofp.

Noticed by inspection; I don't have a testcase for this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147188 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove broken command to copy tblgen tool.
Bob Wilson [Thu, 22 Dec 2011 22:12:40 +0000 (22:12 +0000)]
Remove broken command to copy tblgen tool.

tblgen has been renamed to llvm-tblgen so this command has been failing,
and it's no longer needed because llvm-tblgen is already installed by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147187 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSome unittests for APInt rotates; patch by Cameron McInally.
Eli Friedman [Thu, 22 Dec 2011 22:11:19 +0000 (22:11 +0000)]
Some unittests for APInt rotates; patch by Cameron McInally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147186 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTidy up. Use predicate function a bit more liberally.
Jim Grosbach [Thu, 22 Dec 2011 22:02:35 +0000 (22:02 +0000)]
Tidy up. Use predicate function a bit more liberally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147184 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoReenable building with -fvisibility-inlines-hidden.
Benjamin Kramer [Thu, 22 Dec 2011 21:41:32 +0000 (21:41 +0000)]
Reenable building with -fvisibility-inlines-hidden.

This was disabled years ago because of a bug in GCC 4.1, which is
on our "broken compilers" list for other reasons. Saving ~500k
on a clang binary (Release+Asserts) is well worth dropping support
for it.

We currently disable it for shared libraries (where it would bring
the biggest win) because clang is broken (PR11642).

IMPORTANT: If you're doing incremental builds you may get tons of
linker warnings. make clean will fix them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147182 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix incorrect relocation generation. Patch by Kristof Beyls.
Rafael Espindola [Thu, 22 Dec 2011 21:36:43 +0000 (21:36 +0000)]
Fix incorrect relocation generation. Patch by Kristof Beyls.
Fixes PR11214.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147180 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd the actual code for r147175.
Chad Rosier [Thu, 22 Dec 2011 21:10:46 +0000 (21:10 +0000)]
Add the actual code for r147175.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147176 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoReinstate r146578; it doesn't appear to be the cause of some recent execution-
Chad Rosier [Thu, 22 Dec 2011 21:06:36 +0000 (21:06 +0000)]
Reinstate r146578; it doesn't appear to be the cause of some recent execution-
time regressions.  In general, it is beneficial to compile-time.

Original commit message:
Fix for bug #11429: Wrong behaviour for switches. Small improvement for code
size heuristics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147175 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoARM VFP add encoding of the bitcount to fixed-point<-->floating point. insns.
Jim Grosbach [Thu, 22 Dec 2011 19:55:21 +0000 (19:55 +0000)]
ARM VFP add encoding of the bitcount to fixed-point<-->floating point. insns.

The value from the operands isn't right yet, but we weren't encoding it at
all previously. The parser needs to twiddle the values when building the
instruction.

Partial for: rdar://10558523

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147170 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRemove some bogus comments.
Jim Grosbach [Thu, 22 Dec 2011 19:45:01 +0000 (19:45 +0000)]
Remove some bogus comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147169 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agofix typo
Chris Lattner [Thu, 22 Dec 2011 19:20:51 +0000 (19:20 +0000)]
fix typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147159 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoARM pre-UAL aliases. fcmp[sd].
Jim Grosbach [Thu, 22 Dec 2011 19:20:45 +0000 (19:20 +0000)]
ARM pre-UAL aliases. fcmp[sd].

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147158 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix an incomplete refactoring of the ppc backend. Thanks to rdivacky for reporting
Rafael Espindola [Thu, 22 Dec 2011 18:38:06 +0000 (18:38 +0000)]
Fix an incomplete refactoring of the ppc backend. Thanks to rdivacky for reporting
it. It does need some some tests...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147154 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoARM assembler should accept shift-by-zero for any shifted-immediate operand.
Jim Grosbach [Thu, 22 Dec 2011 18:04:04 +0000 (18:04 +0000)]
ARM assembler should accept shift-by-zero for any shifted-immediate operand.

Just treat it as-if the shift wasn't there at all. 'as' compatibility.

rdar://10604767

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147153 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoARM assembly parser canonicallize on 'lsl' for shift-by-zero form.
Jim Grosbach [Thu, 22 Dec 2011 17:37:00 +0000 (17:37 +0000)]
ARM assembly parser canonicallize on 'lsl' for shift-by-zero form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147152 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoTidy up. Trailing whitespace.
Jim Grosbach [Thu, 22 Dec 2011 17:17:10 +0000 (17:17 +0000)]
Tidy up. Trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147151 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoNuke invalid comment from copy/paste.
Jim Grosbach [Thu, 22 Dec 2011 17:04:50 +0000 (17:04 +0000)]
Nuke invalid comment from copy/paste.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147150 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoGive string constants generated by IRBuilder private linkage.
Benjamin Kramer [Thu, 22 Dec 2011 14:22:14 +0000 (14:22 +0000)]
Give string constants generated by IRBuilder private linkage.

Fixes PR11640.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147144 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoAdd configure support for kfreebsd and hurd. Patch by Sylvestre Ledru.
Rafael Espindola [Thu, 22 Dec 2011 14:01:18 +0000 (14:01 +0000)]
Add configure support for kfreebsd and hurd. Patch by Sylvestre Ledru.
Fixes pr11620.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147143 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake the unreachable probability much much heavier. The previous
Chandler Carruth [Thu, 22 Dec 2011 09:26:37 +0000 (09:26 +0000)]
Make the unreachable probability much much heavier. The previous
probability wouldn't be considered "hot" in some weird loop structures
or other compounding probability patterns. This makes it much harder to
confuse, but isn't really a principled fix. I'd actually like it if we
could model a zero probability, as it would make this much easier to
reason about. Suggestions for how to do this better are welcome.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147142 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoKill the monstrosity that was ELFObjectWriter.h.
Rafael Espindola [Thu, 22 Dec 2011 03:38:00 +0000 (03:38 +0000)]
Kill the monstrosity that was ELFObjectWriter.h.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147136 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMisc cleanups.
Rafael Espindola [Thu, 22 Dec 2011 03:24:43 +0000 (03:24 +0000)]
Misc cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147135 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix APInt::rotl and APInt::rotr so that they work correctly. Found while writing...
Eli Friedman [Thu, 22 Dec 2011 03:15:35 +0000 (03:15 +0000)]
Fix APInt::rotl and APInt::rotr so that they work correctly.  Found while writing some code that tried to use them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147134 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove the Mips only bits of the ELF writer to lib/Target/Mips.
Rafael Espindola [Thu, 22 Dec 2011 03:03:17 +0000 (03:03 +0000)]
Move the Mips only bits of the ELF writer to lib/Target/Mips.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147133 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMake the virtual methods in ARMELFObjectWriter public.
Rafael Espindola [Thu, 22 Dec 2011 02:58:12 +0000 (02:58 +0000)]
Make the virtual methods in ARMELFObjectWriter public.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147132 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoSpeculatively revert r146578 to determine if it is the cause of a number of
Chad Rosier [Thu, 22 Dec 2011 02:40:57 +0000 (02:40 +0000)]
Speculatively revert r146578 to determine if it is the cause of a number of
performance regressions (both execution-time and compile-time) on our
nightly testers.

Original commit message:
Fix for bug #11429: Wrong behaviour for switches. Small improvement for code
size heuristics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147131 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove the MBlaze ELF writer bits to lib/Target/MBlaze.
Rafael Espindola [Thu, 22 Dec 2011 02:28:24 +0000 (02:28 +0000)]
Move the MBlaze ELF writer bits to lib/Target/MBlaze.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147129 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoHoisted some loop invariant smallvector lookups out of a MachineLICM loop
Pete Cooper [Thu, 22 Dec 2011 02:13:25 +0000 (02:13 +0000)]
Hoisted some loop invariant smallvector lookups out of a MachineLICM loop

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147127 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix cmake.
Rafael Espindola [Thu, 22 Dec 2011 02:06:17 +0000 (02:06 +0000)]
Fix cmake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147126 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoChanged MachineLICM to use a worklist list MachineCSE instead of recursion.
Pete Cooper [Thu, 22 Dec 2011 02:05:40 +0000 (02:05 +0000)]
Changed MachineLICM to use a worklist list MachineCSE instead of recursion.

Fixes <rdar://problem/10584116>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147125 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove PPC bits to lib/Target/PowerPC.
Rafael Espindola [Thu, 22 Dec 2011 01:57:09 +0000 (01:57 +0000)]
Move PPC bits to lib/Target/PowerPC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147124 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoHopefully fix the cmake build.
Rafael Espindola [Thu, 22 Dec 2011 01:11:01 +0000 (01:11 +0000)]
Hopefully fix the cmake build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147121 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix name in comments.
Rafael Espindola [Thu, 22 Dec 2011 01:06:53 +0000 (01:06 +0000)]
Fix name in comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147119 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoLocal dynamic TLS model for direct object output. Create the correct TLS MIPS
Akira Hatanaka [Thu, 22 Dec 2011 01:05:17 +0000 (01:05 +0000)]
Local dynamic TLS model for direct object output. Create the correct TLS MIPS
ELF relocations.

Patch by Jack Carter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147118 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoUnbreak cmake build after r147115.
Richard Smith [Thu, 22 Dec 2011 01:03:35 +0000 (01:03 +0000)]
Unbreak cmake build after r147115.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147117 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoMove the ARM specific parts of the ELF writer to Target/ARM.
Rafael Espindola [Thu, 22 Dec 2011 00:37:50 +0000 (00:37 +0000)]
Move the ARM specific parts of the ELF writer to Target/ARM.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147115 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agogetEFlags is const.
Rafael Espindola [Thu, 22 Dec 2011 00:21:50 +0000 (00:21 +0000)]
getEFlags is const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147114 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFixed typo.
Lang Hames [Thu, 22 Dec 2011 00:12:51 +0000 (00:12 +0000)]
Fixed typo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147113 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoARM NEON mnemonic aliase for vrecpeq.
Jim Grosbach [Wed, 21 Dec 2011 23:52:37 +0000 (23:52 +0000)]
ARM NEON mnemonic aliase for vrecpeq.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147109 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoARM VFP optional data type on VMOV GPR<-->SPR.
Jim Grosbach [Wed, 21 Dec 2011 23:24:15 +0000 (23:24 +0000)]
ARM VFP optional data type on VMOV GPR<-->SPR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147104 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoARM NEON optional data type on VSWP instructions.
Jim Grosbach [Wed, 21 Dec 2011 23:09:28 +0000 (23:09 +0000)]
ARM NEON optional data type on VSWP instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147103 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoARM NEON mnemonic aliases for vzipq and vswpq.
Jim Grosbach [Wed, 21 Dec 2011 23:04:33 +0000 (23:04 +0000)]
ARM NEON mnemonic aliases for vzipq and vswpq.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147102 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoRevert patch from 147090. There is not point to make code less readable if we
Jakub Staszak [Wed, 21 Dec 2011 23:02:08 +0000 (23:02 +0000)]
Revert patch from 147090. There is not point to make code less readable if we
don't get any serious benefit there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147101 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoARM asm parser should be more lenient w/ .thumb_func directive.
Jim Grosbach [Wed, 21 Dec 2011 22:30:16 +0000 (22:30 +0000)]
ARM asm parser should be more lenient w/ .thumb_func directive.

Rather than require the symbol to be explicitly an argument of the directive,
allow it to look ahead and grab the symbol from the next non-whitespace
line.

rdar://10611140

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147100 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix a copy+pasto. No testcase, because the symptoms of dereferencing
Dan Gohman [Wed, 21 Dec 2011 21:43:50 +0000 (21:43 +0000)]
Fix a copy+pasto. No testcase, because the symptoms of dereferencing
an invalid iterator aren't reproducible.  rdar://10614085.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147098 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoThumb2 assembly parsing of 'mov rd, rn, rrx'.
Jim Grosbach [Wed, 21 Dec 2011 21:04:19 +0000 (21:04 +0000)]
Thumb2 assembly parsing of 'mov rd, rn, rrx'.

Maps to the RRX instruction. Missed this case earlier.

rdar://10615373

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147096 91177308-0d34-0410-b5e6-96231b3b80d8

12 years agoFix 80-column violations.
Chad Rosier [Wed, 21 Dec 2011 20:59:09 +0000 (20:59 +0000)]
Fix 80-column violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147095 91177308-0d34-0410-b5e6-96231b3b80d8