Silviu Baranga [Thu, 5 Apr 2012 16:19:29 +0000 (16:19 +0000)]
Added support for unpredictable ADC/SBC instructions on ARM, and also fixed some corner cases involving the PC register as an operand for these instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154101
91177308-0d34-0410-b5e6-
96231b3b80d8
Silviu Baranga [Thu, 5 Apr 2012 16:13:15 +0000 (16:13 +0000)]
Added support for handling unpredictable arithmetic instructions on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154100
91177308-0d34-0410-b5e6-
96231b3b80d8
Hongbin Zheng [Thu, 5 Apr 2012 16:07:49 +0000 (16:07 +0000)]
BBVectorize: Add the const modifier to the VectorizeConfig because we won't
modify it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154098
91177308-0d34-0410-b5e6-
96231b3b80d8
Hongbin Zheng [Thu, 5 Apr 2012 15:46:55 +0000 (15:46 +0000)]
Introduce the VectorizeConfig class, with which we can control the behavior
of the BBVectorizePass without using command line option. As pointed out
by Hal, we can ask the TargetLoweringInfo for the architecture specific
VectorizeConfig to perform vectorizing with architecture specific
information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154096
91177308-0d34-0410-b5e6-
96231b3b80d8
James Molloy [Thu, 5 Apr 2012 10:01:12 +0000 (10:01 +0000)]
An oversight when applying the patches for r150956 and r150957 to a vanilla tree meant I forgot to svn add these testcases.
Noticed while investigating PR12274!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154090
91177308-0d34-0410-b5e6-
96231b3b80d8
Hongbin Zheng [Thu, 5 Apr 2012 08:05:16 +0000 (08:05 +0000)]
Add the function "vectorizeBasicBlock" which allow users vectorize a
BasicBlock in other passes, e.g. we can call vectorizeBasicBlock in the
loop unroll pass right after the loop is unrolled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154089
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 5 Apr 2012 07:23:53 +0000 (07:23 +0000)]
ARM assembly aliases for two-operand V[R]SHR instructions.
rdar://
11189467
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154087
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 5 Apr 2012 04:23:56 +0000 (04:23 +0000)]
In MemoryBuffer::getOpenFile() make sure that the buffer is null-terminated if
the caller requested a null-terminated one.
When mapping the file there could be a racing issue that resulted in the file being larger
than the FileSize passed by the caller. We already have an assertion
for this in MemoryBuffer::init() but have a runtime guarantee that
the buffer will be null-terminated, so do a copy that adds a null-terminator.
Protects against crash of rdar://
11161822.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154082
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 5 Apr 2012 03:17:53 +0000 (03:17 +0000)]
ARM assembly parsing for 'msr' plain 'cpsr' operand.
Plain 'cpsr' is an alias for 'cpsr_fc'.
rdar://
11153753
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154080
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 5 Apr 2012 03:10:56 +0000 (03:10 +0000)]
Pass the right sign to TLI->isLegalICmpImmediate.
LSR can fold three addressing modes into its ICmpZero node:
ICmpZero BaseReg + Offset => ICmp BaseReg, -Offset
ICmpZero -1*ScaleReg + Offset => ICmp ScaleReg, Offset
ICmpZero BaseReg + -1*ScaleReg => ICmp BaseReg, ScaleReg
The first two cases are only used if TLI->isLegalICmpImmediate() likes
the offset.
Make sure the right Offset sign is passed to this method in the second
case. The ARM version is not symmetric.
<rdar://problem/
11184260>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154079
91177308-0d34-0410-b5e6-
96231b3b80d8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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