oota-llvm.git
12 years agoDo not include multiple -arch options in CPPFLAGS.
Bob Wilson [Thu, 5 Apr 2012 00:35:55 +0000 (00:35 +0000)]
Do not include multiple -arch options in CPPFLAGS.

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

12 years agoFix -Wnon-virtual-dtor warnings.
Michael J. Spencer [Wed, 4 Apr 2012 22:34:55 +0000 (22:34 +0000)]
Fix -Wnon-virtual-dtor warnings.

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

12 years agoReapply 154038 without the failing test.
Akira Hatanaka [Wed, 4 Apr 2012 22:16:36 +0000 (22:16 +0000)]
Reapply 154038 without the failing test.

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

12 years agoRevert r154038. It was causing make check failures.
Owen Anderson [Wed, 4 Apr 2012 21:18:58 +0000 (21:18 +0000)]
Revert r154038.  It was causing make check failures.

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

12 years agoREG_SEQUENCE expansion to COPY instructions wasn't taking account of sub register...
Pete Cooper [Wed, 4 Apr 2012 21:03:25 +0000 (21:03 +0000)]
REG_SEQUENCE expansion to COPY instructions wasn't taking account of sub register indices on the source registers.  No simple test case

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

12 years agoFix a C++11 UDL conflict.
Benjamin Kramer [Wed, 4 Apr 2012 20:33:56 +0000 (20:33 +0000)]
Fix a C++11 UDL conflict.

Still not fixed in the standard ;)

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

12 years agof16 FREM can now be legalized by promoting to f32
Pete Cooper [Wed, 4 Apr 2012 19:36:31 +0000 (19:36 +0000)]
f16 FREM can now be legalized by promoting to f32

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

12 years agoFix LowerGlobalAddress to produce instructions with the correct relocation
Akira Hatanaka [Wed, 4 Apr 2012 19:02:38 +0000 (19:02 +0000)]
Fix LowerGlobalAddress to produce instructions with the correct relocation
types for N32 ABI. Add new test case and update existing ones.

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

12 years agoFix LowerJumpTable to produce instructions with the correct relocation
Akira Hatanaka [Wed, 4 Apr 2012 18:31:32 +0000 (18:31 +0000)]
Fix LowerJumpTable to produce instructions with the correct relocation
types for N32 ABI. Test case will be updated after the patch that fixes
TargetLowering::getPICJumpTableRelocBase is checked in.

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

12 years agoFix LowerConstantPool to produce instructions with the correct relocation
Akira Hatanaka [Wed, 4 Apr 2012 18:26:12 +0000 (18:26 +0000)]
Fix LowerConstantPool to produce instructions with the correct relocation
types for N32 ABI and update test case.

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

12 years agoImplement ARMBaseInstrInfo::commuteInstruction() for MOVCCr.
Jakob Stoklund Olesen [Wed, 4 Apr 2012 18:23:42 +0000 (18:23 +0000)]
Implement ARMBaseInstrInfo::commuteInstruction() for MOVCCr.

A MOVCCr instruction can be commuted by inverting the condition. This
can help reduce register pressure and remove unnecessary copies in some
cases.

<rdar://problem/11182914>

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

12 years agoRemove spurious debug output.
Jakob Stoklund Olesen [Wed, 4 Apr 2012 18:23:38 +0000 (18:23 +0000)]
Remove spurious debug output.

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

12 years agoFix LowerBlockAddress to produce instructions with the correct relocation
Akira Hatanaka [Wed, 4 Apr 2012 18:22:53 +0000 (18:22 +0000)]
Fix LowerBlockAddress to produce instructions with the correct relocation
types for N32 ABI and update test case.

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

12 years agoAdd testcase for r154007, when a function has the optsize attribute,
Hongbin Zheng [Wed, 4 Apr 2012 13:24:40 +0000 (13:24 +0000)]
Add testcase for r154007, when a function has the optsize attribute,
  the loop should be unrolled according the value of OptSizeUnrollThreshold.

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

12 years agoAlways compute all the bits in ComputeMaskedBits.
Rafael Espindola [Wed, 4 Apr 2012 12:51:34 +0000 (12:51 +0000)]
Always compute all the bits in ComputeMaskedBits.
This allows us to keep passing reduced masks to SimplifyDemandedBits, but
know about all the bits if SimplifyDemandedBits fails. This allows instcombine
to simplify cases like the one in the included testcase.

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

12 years agoLoopUnrollPass: Use variable "Threshold" instead of "CurrentThreshold" when
Hongbin Zheng [Wed, 4 Apr 2012 11:44:08 +0000 (11:44 +0000)]
LoopUnrollPass: Use variable "Threshold" instead of "CurrentThreshold" when
  reducing unroll count, otherwise the reduced unroll count is not taking
  the "OptimizeForSize" attribute into account.

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

12 years agoMove yaml::Stream's dtor out of line so it can see Scanner's dtor.
Benjamin Kramer [Wed, 4 Apr 2012 08:53:34 +0000 (08:53 +0000)]
Move yaml::Stream's dtor out of line so it can see Scanner's dtor.

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

12 years agoImplement DwarfLLVMRegPair::operator< without violating asymmetry.
Benjamin Kramer [Wed, 4 Apr 2012 08:24:08 +0000 (08:24 +0000)]
Implement DwarfLLVMRegPair::operator< without violating asymmetry.

MSVC8 verifies this.

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

12 years agoConvert assert(false) followed by a return to llvm_unreachable
Craig Topper [Wed, 4 Apr 2012 04:55:46 +0000 (04:55 +0000)]
Convert assert(false) followed by a return to llvm_unreachable

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

12 years agoRemove default case from switch that was already covering all cases.
Craig Topper [Wed, 4 Apr 2012 04:42:42 +0000 (04:42 +0000)]
Remove default case from switch that was already covering all cases.

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

12 years agoRemoved useless switch for default case when switch was covering all the enum values
Pete Cooper [Wed, 4 Apr 2012 00:53:04 +0000 (00:53 +0000)]
Removed useless switch for default case when switch was covering all the enum values

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

12 years agoFix the install location for the Embedded makefile target.
Bob Wilson [Tue, 3 Apr 2012 23:44:39 +0000 (23:44 +0000)]
Fix the install location for the Embedded makefile target.

svn r145378 inadvertently changed the destination for the Embedded target
in the makefile.  Add a "/Developer" suffix to DSTROOT to compensate.

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

12 years agoSorry about that. MSVC seems to accept just about any random string you give it ;/
Michael J. Spencer [Tue, 3 Apr 2012 23:36:44 +0000 (23:36 +0000)]
Sorry about that. MSVC seems to accept just about any random string you give it ;/

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

12 years agoRemove dead code for installing libLTO when building llvmCore.
Bob Wilson [Tue, 3 Apr 2012 23:13:26 +0000 (23:13 +0000)]
Remove dead code for installing libLTO when building llvmCore.

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

12 years agoAdd YAML parser to Support.
Michael J. Spencer [Tue, 3 Apr 2012 23:09:22 +0000 (23:09 +0000)]
Add YAML parser to Support.

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

12 years agoAdd VSELECT to LegalizeVectorTypes::ScalariseVectorResult. Previously it would crash...
Pete Cooper [Tue, 3 Apr 2012 22:57:55 +0000 (22:57 +0000)]
Add VSELECT to LegalizeVectorTypes::ScalariseVectorResult.  Previously it would crash if it encountered a 1 element VSELECT.  Solution is slightly more complicated than just creating a SELET as we have to mask or sign extend the vector condition if it had different boolean contents from the scalar condition.  Fixes <rdar://problem/11178095>

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

12 years agoRemoved one last bad continue statement meant to be removed in r153914.
Pete Cooper [Tue, 3 Apr 2012 22:18:49 +0000 (22:18 +0000)]
Removed one last bad continue statement meant to be removed in r153914.

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

12 years agoWhen building llvmCore, pass the SDKROOT and -arch setting to configure.
Bob Wilson [Tue, 3 Apr 2012 21:50:26 +0000 (21:50 +0000)]
When building llvmCore, pass the SDKROOT and -arch setting to configure.

So far all of configure tests have been run against the default SDK and
architecture, regardless of what is actually being built.  We've gotten
lucky until now.  <rdar://problem/11112479>

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

12 years agoRemove a reference to the C backend.
Bob Wilson [Tue, 3 Apr 2012 21:50:24 +0000 (21:50 +0000)]
Remove a reference to the C backend.

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

12 years agoFix an issue in SimplifySetCC() specific to vector comparisons.
Chad Rosier [Tue, 3 Apr 2012 20:11:24 +0000 (20:11 +0000)]
Fix an issue in SimplifySetCC() specific to vector comparisons.

When folding X == X we need to check getBooleanContents() to determine if the
result is a vector of ones or a vector of negative ones.

I tried creating a test case, but the problem seems to only be exposed on a
much older version of clang (around r144500).
rdar://10923049

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

12 years agoSet soname for FreeBSD as well.
Anton Korobeynikov [Tue, 3 Apr 2012 19:48:31 +0000 (19:48 +0000)]
Set soname for FreeBSD as well.
Patch by Bernard Cafarelli!

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

12 years agoFix thinko check for number of operands to be the one that actually
Eric Christopher [Tue, 3 Apr 2012 17:55:42 +0000 (17:55 +0000)]
Fix thinko check for number of operands to be the one that actually
might have more than 19 operands. Add a testcase to make sure I
never screw that up again.

Part of rdar://11026482

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

12 years agoMatrix simplification in PBQP may push infinite costs onto register options.
Lang Hames [Tue, 3 Apr 2012 16:27:16 +0000 (16:27 +0000)]
Matrix simplification in PBQP may push infinite costs onto register options.
The colorability heuristic should count these as denied registers.

No test case - this exposed a bug on an out-of-tree target.

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

12 years agoARMDisassembler: drop bogus dependency on ARMCodeGen
Dylan Noblesmith [Tue, 3 Apr 2012 15:48:14 +0000 (15:48 +0000)]
ARMDisassembler: drop bogus dependency on ARMCodeGen

And indirectly, a dependency on most of the core LLVM optimization
libraries.

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

12 years agoObject: drop bogus VMCore dependency
Dylan Noblesmith [Tue, 3 Apr 2012 15:48:10 +0000 (15:48 +0000)]
Object: drop bogus VMCore dependency

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

12 years agoThe speedup doesn't appear to have been from this, but was an anomaly of my testing...
Bill Wendling [Tue, 3 Apr 2012 11:19:21 +0000 (11:19 +0000)]
The speedup doesn't appear to have been from this, but was an anomaly of my testing machine.

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

12 years agoReserve space for the eventual filling of the vector. This gives a small speedup.
Bill Wendling [Tue, 3 Apr 2012 10:50:09 +0000 (10:50 +0000)]
Reserve space for the eventual filling of the vector. This gives a small speedup.

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

12 years agoAdd an additional testcase which checks ops with multiple users.
Nadav Rotem [Tue, 3 Apr 2012 07:39:36 +0000 (07:39 +0000)]
Add an additional testcase which checks ops with multiple users.

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

12 years agoMake PPCCompilationCallbackC function to be static, so there will be no need to issue...
Anton Korobeynikov [Tue, 3 Apr 2012 06:59:28 +0000 (06:59 +0000)]
Make PPCCompilationCallbackC function to be static, so there will be no need to issue call via
PLT when LLVM is built as shared library. This mimics the X86 backend towards the approach.

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

12 years agoTidy up spacing in some tablegen outputs.
Craig Topper [Tue, 3 Apr 2012 06:52:47 +0000 (06:52 +0000)]
Tidy up spacing in some tablegen outputs.

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

12 years agoAdd support for AVX enhanced comparison predicates. Patch from Kay Tiong Khoo.
Craig Topper [Tue, 3 Apr 2012 05:20:24 +0000 (05:20 +0000)]
Add support for AVX enhanced comparison predicates. Patch from Kay Tiong Khoo.

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

12 years agoReformatting. No functionality change.
Bill Wendling [Tue, 3 Apr 2012 03:56:52 +0000 (03:56 +0000)]
Reformatting. No functionality change.

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

12 years agoAs Eric pointed out, even a Debug build should be equal. Leave the flag that can...
Bill Wendling [Tue, 3 Apr 2012 03:27:43 +0000 (03:27 +0000)]
As Eric pointed out, even a Debug build should be equal. Leave the flag that can turn off comparisons though.

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

12 years agoRevert r153924. Delete test/MC/Disassembler/Mips and lib/Target/Mips/Disassembler.
Akira Hatanaka [Tue, 3 Apr 2012 03:01:13 +0000 (03:01 +0000)]
Revert r153924. Delete test/MC/Disassembler/Mips and lib/Target/Mips/Disassembler.

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

12 years agoRevert r153924. There were buildbot failures.
Akira Hatanaka [Tue, 3 Apr 2012 02:51:09 +0000 (02:51 +0000)]
Revert r153924. There were buildbot failures.

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

12 years agoMIPS disassembler support.
Akira Hatanaka [Tue, 3 Apr 2012 02:20:58 +0000 (02:20 +0000)]
MIPS disassembler support.

Patch by Vladimir Medic.

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

12 years agoCleanup set_union usage. The same thing but a bit cleaner now.
Andrew Trick [Tue, 3 Apr 2012 01:35:52 +0000 (01:35 +0000)]
Cleanup set_union usage. The same thing but a bit cleaner now.

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

12 years agoUse std::set_union instead of nasty custom code.
Andrew Trick [Tue, 3 Apr 2012 00:47:23 +0000 (00:47 +0000)]
Use std::set_union instead of nasty custom code.

I just noticed Jakob's examples of the proper application of
std::set... routines.

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

12 years agoAdd a line number for the scope of the function (starting at the first
Eric Christopher [Tue, 3 Apr 2012 00:43:49 +0000 (00:43 +0000)]
Add a line number for the scope of the function (starting at the first
brace) so that we get more accurate line number information about the
declaration of a given function and the line where the function
first starts.

Part of rdar://11026482

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

12 years agoFixes to r153903. Added missing explanation of behaviour when the VirtRegMap is...
Pete Cooper [Tue, 3 Apr 2012 00:28:46 +0000 (00:28 +0000)]
Fixes to r153903.  Added missing explanation of behaviour when the VirtRegMap is NULL.  Also changed it in this case to just avoid updating the map, but live ranges or intervals will still get updated and created

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

12 years agoCompare the .o files only for release builds. Add an option to bypass the comparison...
Bill Wendling [Mon, 2 Apr 2012 23:27:43 +0000 (23:27 +0000)]
Compare the .o files only for release builds. Add an option to bypass the comparison altogether.

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

12 years agoMoved LiveRangeEdit.h so that it can be called from other parts of the backend, not...
Pete Cooper [Mon, 2 Apr 2012 22:44:18 +0000 (22:44 +0000)]
Moved LiveRangeEdit.h so that it can be called from other parts of the backend, not just libCodeGen

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

12 years agoMake dominatedBySlowTreeWalk private and assert cases handled by the caller.
Rafael Espindola [Mon, 2 Apr 2012 22:37:54 +0000 (22:37 +0000)]
Make dominatedBySlowTreeWalk private and assert cases handled by the caller.

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

12 years agoAllocate virtual registers in ascending order.
Jakob Stoklund Olesen [Mon, 2 Apr 2012 22:30:39 +0000 (22:30 +0000)]
Allocate virtual registers in ascending order.

This is just the fallback tie-breaker ordering, the main allocation
order is still descending size.

Patch by Shamil Kurmangaleev!

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

12 years agoRefactored the LiveRangeEdit interface so that MachineFunction, TargetInstrInfo,...
Pete Cooper [Mon, 2 Apr 2012 22:22:53 +0000 (22:22 +0000)]
Refactored the LiveRangeEdit interface so that MachineFunction, TargetInstrInfo, MachineRegisterInfo, LiveIntervals, and VirtRegMap are all passed into the constructor and stored as members instead of passed in to each method.

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

12 years agoAdd an option to turn off the expensive GVN load PRE part of GVN.
Bill Wendling [Mon, 2 Apr 2012 22:16:50 +0000 (22:16 +0000)]
Add an option to turn off the expensive GVN load PRE part of GVN.

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

12 years agoAdd predicates for checking whether targets have free FNEG and FABS operations, and...
Owen Anderson [Mon, 2 Apr 2012 22:10:29 +0000 (22:10 +0000)]
Add predicates for checking whether targets have free FNEG and FABS operations, and prevent the DAGCombiner from turning them into bitwise operations if they do.

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

12 years agoDuring two-address lowering, rescheduling an instruction does not untie
Lang Hames [Mon, 2 Apr 2012 19:58:43 +0000 (19:58 +0000)]
During two-address lowering, rescheduling an instruction does not untie
operands. Make TryInstructionTransform return false to reflect this.
Fixes PR11861.

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

12 years agoNo need to run llvm-as.
Rafael Espindola [Mon, 2 Apr 2012 19:44:20 +0000 (19:44 +0000)]
No need to run llvm-as.

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

12 years agoInitial 64 bit direct object support.
Akira Hatanaka [Mon, 2 Apr 2012 19:25:22 +0000 (19:25 +0000)]
Initial 64 bit direct object support.

This patch allows llvm to recognize that a 64 bit object file is being produced
and that the subsequently generated ELF header has the correct information.

The test case checks for both big and little endian flavors.

Patch by Jack Carter.

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

12 years agoThe binutils for the IBM BG/P are too old to support CFI.
Hal Finkel [Mon, 2 Apr 2012 19:09:04 +0000 (19:09 +0000)]
The binutils for the IBM BG/P are too old to support CFI.

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

12 years agoAdd triple support for the IBM BG/P and BG/Q supercomputers.
Hal Finkel [Mon, 2 Apr 2012 18:31:33 +0000 (18:31 +0000)]
Add triple support for the IBM BG/P and BG/Q supercomputers.

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

12 years agoTurn on the accelerator tables for Darwin.
Eric Christopher [Mon, 2 Apr 2012 17:58:52 +0000 (17:58 +0000)]
Turn on the accelerator tables for Darwin.

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

12 years agoFast fix for PR12343:
Stepan Dyatkovskiy [Mon, 2 Apr 2012 17:16:45 +0000 (17:16 +0000)]
Fast fix for PR12343:
http://llvm.org/bugs/show_bug.cgi?id=12343

We have not trivial way for splitting edges that are goes from indirect branch. We can do it with some tricks, but it should be additionally discussed. And it is still dangerous due to difficulty of indirect branches controlling.

Fix forbids this case for unswitching.

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

12 years agoImplement the SVR4 byval alignment for aggregates. Fixing a FIXME.
Roman Divacky [Mon, 2 Apr 2012 15:49:30 +0000 (15:49 +0000)]
Implement the SVR4 byval alignment for aggregates. Fixing a FIXME.

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

12 years agoSecond part for the 153874 one
Silviu Baranga [Mon, 2 Apr 2012 15:46:46 +0000 (15:46 +0000)]
Second part for the 153874 one

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

12 years agoAdded fix in TableGen instruction decoder generation. The decoder now breaks for...
Silviu Baranga [Mon, 2 Apr 2012 15:20:39 +0000 (15:20 +0000)]
Added fix in TableGen instruction decoder generation. The decoder now breaks for every leaf node.

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

12 years agoAdd missing 'd'.
Rafael Espindola [Mon, 2 Apr 2012 13:02:57 +0000 (13:02 +0000)]
Add missing 'd'.

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

12 years agoHack the hack. If we have a situation where an ASM object is defined but isn't
Bill Wendling [Mon, 2 Apr 2012 10:01:21 +0000 (10:01 +0000)]
Hack the hack. If we have a situation where an ASM object is defined but isn't
reflected in the LLVM IR (as a declare or something), then treat it like a data
object.

N.B. This isn't 100% correct. The ASM parser should supply more information so
that we know what type of object it is, and what attributes it should have.

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

12 years agoEmit the asm writer's mnemonic table with SequenceToOffsetTable.
Benjamin Kramer [Mon, 2 Apr 2012 09:13:46 +0000 (09:13 +0000)]
Emit the asm writer's mnemonic table with SequenceToOffsetTable.

This way we can get AVX v-prefixed instructions tail merged with the normal insns.

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

12 years agoMove getOpcodeName from the various target InstPrinters into the superclass MCInstPri...
Benjamin Kramer [Mon, 2 Apr 2012 08:32:38 +0000 (08:32 +0000)]
Move getOpcodeName from the various target InstPrinters into the superclass MCInstPrinter.

All implementations used the same code.

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

12 years agoReorder fields in MatchEntry and OperandMatchEntry to reduce padding. A bit tricky...
Craig Topper [Mon, 2 Apr 2012 07:48:39 +0000 (07:48 +0000)]
Reorder fields in MatchEntry and OperandMatchEntry to reduce padding. A bit tricky due to the target specific sizes for some of the fields so the ordering is only optimal for the targets in the tree.

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

12 years agoOptimizing swizzles of complex shuffles may generate additional complex shuffles.
Nadav Rotem [Mon, 2 Apr 2012 07:11:12 +0000 (07:11 +0000)]
Optimizing swizzles of complex shuffles may generate additional complex shuffles.

Do not try to optimize swizzles of shuffles if the source shuffle has more than
a single user, except when the source shuffle is also a swizzle.

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

12 years agoRemove getInstructionName from MCInstPrinter implementations in favor of using the...
Craig Topper [Mon, 2 Apr 2012 07:01:04 +0000 (07:01 +0000)]
Remove getInstructionName from MCInstPrinter implementations in favor of using the instruction name table from MCInstrInfo. Reduces static data in the InstPrinter implementations.

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

12 years agoFix CXXFLAGS for huge_val.m4.
Eric Christopher [Mon, 2 Apr 2012 06:54:01 +0000 (06:54 +0000)]
Fix CXXFLAGS for huge_val.m4.

Patch by Jeremy Huddleston!

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

12 years agoMake MCInstrInfo available to the MCInstPrinter. This will be used to remove getInstr...
Craig Topper [Mon, 2 Apr 2012 06:09:36 +0000 (06:09 +0000)]
Make MCInstrInfo available to the MCInstPrinter. This will be used to remove getInstructionName and the static data it contains since the same tables are already in MCInstrInfo.

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

12 years agoIt could come about that we parse the inline ASM before we get a potential
Bill Wendling [Mon, 2 Apr 2012 03:33:31 +0000 (03:33 +0000)]
It could come about that we parse the inline ASM before we get a potential
definition for it. In that case, we want to wait for the potential definition
before we create a symbol for it.

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

12 years agoUse SequenceToOffsetTable to generate instruction name table for AsmWriter.
Craig Topper [Mon, 2 Apr 2012 00:47:39 +0000 (00:47 +0000)]
Use SequenceToOffsetTable to generate instruction name table for AsmWriter.

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

12 years agoStart cleaning up the InlineCost class. This switches to sentinel values
Chandler Carruth [Sun, 1 Apr 2012 22:44:09 +0000 (22:44 +0000)]
Start cleaning up the InlineCost class. This switches to sentinel values
rather than a bitfield, a great suggestion by Chris during code review.

There is still quite a bit of cruft in the interface, but that requires
sorting out some awkward uses of the cost inside the actual inliner.

No functionality changed intended here.

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

12 years agoFix some 80-col. violations I introduced with the A2 PPC64 core.
Hal Finkel [Sun, 1 Apr 2012 21:20:14 +0000 (21:20 +0000)]
Fix some 80-col. violations I introduced with the A2 PPC64 core.

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

12 years agoEnable prefetch generation on PPC64.
Hal Finkel [Sun, 1 Apr 2012 20:08:17 +0000 (20:08 +0000)]
Enable prefetch generation on PPC64.

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

12 years agoAdd LdStSTD* itin. for the PPC64 A2 core.
Hal Finkel [Sun, 1 Apr 2012 20:08:08 +0000 (20:08 +0000)]
Add LdStSTD* itin. for the PPC64 A2 core.

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

12 years agoThis commit contains a few changes that had to go in together.
Nadav Rotem [Sun, 1 Apr 2012 19:31:22 +0000 (19:31 +0000)]
This commit contains a few changes that had to go in together.

1. Simplify xor/and/or (bitcast(A), bitcast(B)) -> bitcast(op (A,B))
   (and also scalar_to_vector).

2. Xor/and/or are indifferent to the swizzle operation (shuffle of one src).
   Simplify xor/and/or (shuff(A), shuff(B)) -> shuff(op (A, B))

3. Optimize swizzles of shuffles:  shuff(shuff(x, y), undef) -> shuff(x, y).

4. Fix an X86ISelLowering optimization which was very bitcast-sensitive.

Code which was previously compiled to this:

movd    (%rsi), %xmm0
movdqa  .LCPI0_0(%rip), %xmm2
pshufb  %xmm2, %xmm0
movd    (%rdi), %xmm1
pshufb  %xmm2, %xmm1
pxor    %xmm0, %xmm1
pshufb  .LCPI0_1(%rip), %xmm1
movd    %xmm1, (%rdi)
ret

Now compiles to this:

movl    (%rsi), %eax
xorl    %eax, (%rdi)
ret

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

12 years agoFix typo.
Lang Hames [Sun, 1 Apr 2012 19:27:25 +0000 (19:27 +0000)]
Fix typo.

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

12 years agoSet the default PPC node scheduling preference to ILP (for the embedded cores).
Hal Finkel [Sun, 1 Apr 2012 19:23:08 +0000 (19:23 +0000)]
Set the default PPC node scheduling preference to ILP (for the embedded cores).

The 440 and A2 cores have detailed itineraries, and this allows them to be
fully used to maximize throughput.

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

12 years agoAdd ppc440 itin. entries for LdStSTD*
Hal Finkel [Sun, 1 Apr 2012 19:23:04 +0000 (19:23 +0000)]
Add ppc440 itin. entries for LdStSTD*

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

12 years agoUse full anti-dep. breaking with post-ra sched. on the embedded ppc cores.
Hal Finkel [Sun, 1 Apr 2012 19:22:57 +0000 (19:22 +0000)]
Use full anti-dep. breaking with post-ra sched. on the embedded ppc cores.

Post-RA scheduling gives a significant performance improvement on
the embedded cores, so turn it on. Using full anti-dep. breaking is
important for FP-intensive blocks, so turn it on (just on the
embedded cores for now; this should also be good on the 970s because
post-ra scheduling is all that we have for now, but that should have
more testing first).

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

12 years agoAdd instruction itinerary for the PPC64 A2 core.
Hal Finkel [Sun, 1 Apr 2012 19:22:40 +0000 (19:22 +0000)]
Add instruction itinerary for the PPC64 A2 core.

This adds a full itinerary for IBM's PPC64 A2 embedded core. These
cores form the basis for the CPUs in the new IBM BG/Q supercomputer.

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

12 years agoUse SequenceToOffsetTable to create instruction name table. Saves space particularly...
Craig Topper [Sun, 1 Apr 2012 18:14:14 +0000 (18:14 +0000)]
Use SequenceToOffsetTable to create instruction name table. Saves space particularly on X86 where AVX instructions just add a 'v' to the front of other instructions.

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

12 years agoEmit the LLVM<->DWARF register mapping as a sorted table and use binary search to...
Benjamin Kramer [Sun, 1 Apr 2012 14:23:58 +0000 (14:23 +0000)]
Emit the LLVM<->DWARF register mapping as a sorted table and use binary search to do the lookup.

This also avoids emitting the information twice, which led to code bloat. On i386-linux-Release+Asserts
with all targets built this change shaves a whopping 1.3 MB off clang. The number is probably exaggerated
by recent inliner changes but the methods were already enormous with the old inline cost computation.

The DWARF reg -> LLVM reg mapping doesn't seem to have holes in it, so it could be a simple lookup table.
I didn't implement that optimization yet to avoid potentially changing functionality.

There is still some duplication both in tablegen and the generated code that should be cleaned up eventually.

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

12 years agoBelatedly address some code review from Chris.
Chandler Carruth [Sun, 1 Apr 2012 10:41:24 +0000 (10:41 +0000)]
Belatedly address some code review from Chris.

As a side note, I really dislike array_pod_sort... Do we really still
care about any STL implementations that get this so wrong? Does libc++?

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

12 years agoAdd some more testing to cover the remaining two cases where
Chandler Carruth [Sun, 1 Apr 2012 10:36:17 +0000 (10:36 +0000)]
Add some more testing to cover the remaining two cases where
always-inlining is disabled: recursive functions and indirectbr.

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

12 years agoFix a pretty scary bug I introduced into the always inliner with
Chandler Carruth [Sun, 1 Apr 2012 10:21:05 +0000 (10:21 +0000)]
Fix a pretty scary bug I introduced into the always inliner with
a single missing character. Somehow, this had gone untested. I've added
tests for returns-twice logic specifically with the always-inliner that
would have caught this, and fixed the bug.

Thanks to Matt for the careful review and spotting this!!! =D

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

12 years agoReplace four tiny tests with various uses of grep and not with a single
Chandler Carruth [Sun, 1 Apr 2012 10:11:17 +0000 (10:11 +0000)]
Replace four tiny tests with various uses of grep and not with a single
test and FileCheck.

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

12 years agomisched: Add finalizeScheduler to complete the target interface.
Andrew Trick [Sun, 1 Apr 2012 07:24:23 +0000 (07:24 +0000)]
misched: Add finalizeScheduler to complete the target interface.

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

12 years agoRemoving a file that's no longer being used after the recent refactorings
Eli Bendersky [Sun, 1 Apr 2012 06:50:01 +0000 (06:50 +0000)]
Removing a file that's no longer being used after the recent refactorings

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

12 years agoSplit the LdStGeneral PPC itin. class into LdStLoad and LdStStore.
Hal Finkel [Sun, 1 Apr 2012 04:44:16 +0000 (04:44 +0000)]
Split the LdStGeneral PPC itin. class into LdStLoad and LdStStore.

Loads and stores can have different pipeline behavior, especially on
embedded chips. This change allows those differences to be expressed.
Except for the 440 scheduler, there are no functionality changes.
On the 440, the latency adjustment is only by one cycle, and so this
probably does not affect much. Nevertheless, it will make a larger
difference in the future and this removes a FIXME from the 440 itin.

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

12 years agoAdd a workaround for building with old versions of clang.
Rafael Espindola [Sat, 31 Mar 2012 21:54:20 +0000 (21:54 +0000)]
Add a workaround for building with old versions of clang.

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

12 years agoAdd a triple to the test.
Rafael Espindola [Sat, 31 Mar 2012 18:59:07 +0000 (18:59 +0000)]
Add a triple to the test.

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

12 years agoTeach CodeGen's version of computeMaskedBits to understand the range metadata.
Rafael Espindola [Sat, 31 Mar 2012 18:14:00 +0000 (18:14 +0000)]
Teach CodeGen's version of computeMaskedBits to understand the range metadata.
This is the CodeGen equivalent of r153747. I tested that there is not noticeable
performance difference with any combination of -O0/-O2 /-g when compiling
gcc as a single compilation unit.

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