OSDN Git Service

android-x86/external-llvm.git
13 years agoParameterize away the ARM T1Cop class.
Jim Grosbach [Wed, 13 Jul 2011 21:17:59 +0000 (21:17 +0000)]
Parameterize away the ARM T1Cop class.

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

13 years agoFix predicates for Thumb co-processor instructions.
Jim Grosbach [Wed, 13 Jul 2011 21:14:23 +0000 (21:14 +0000)]
Fix predicates for Thumb co-processor instructions.

They're all Thumb2 only, not just some of them. More refactoring cleanup
coming.

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

13 years agoOnly keep the global split candidates that work out.
Jakob Stoklund Olesen [Wed, 13 Jul 2011 20:49:46 +0000 (20:49 +0000)]
Only keep the global split candidates that work out.

Some pysical registers create split solutions that would spill anywhere.
They should not even be considered in future multi-way global splits.

This does not affect code generation (yet).

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

13 years agoRefactor out checking for displacements on x86-64 addressing modes. No functionality...
Eli Friedman [Wed, 13 Jul 2011 20:44:23 +0000 (20:44 +0000)]
Refactor out checking for displacements on x86-64 addressing modes.  No functionality change.  Refactoring in preparation for an additional safety check in FoldOffsetIntoAddress.

Part of <rdar://problem/9763308>.

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

13 years agoTestcases for ARM assembly BX/BXJ instructions.
Jim Grosbach [Wed, 13 Jul 2011 20:25:46 +0000 (20:25 +0000)]
Testcases for ARM assembly BX/BXJ instructions.

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

13 years agoFix encoding for ARM BXJ instruction.
Jim Grosbach [Wed, 13 Jul 2011 20:25:01 +0000 (20:25 +0000)]
Fix encoding for ARM BXJ instruction.

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

13 years agoFix encoding of predicate bits on ARM BX_pred.
Jim Grosbach [Wed, 13 Jul 2011 20:21:31 +0000 (20:21 +0000)]
Fix encoding of predicate bits on ARM BX_pred.

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

13 years agoMove the InterferenceCache cursor into the GlobalSplitCand struct.
Jakob Stoklund Olesen [Wed, 13 Jul 2011 20:14:52 +0000 (20:14 +0000)]
Move the InterferenceCache cursor into the GlobalSplitCand struct.

This is in preparation of supporting multiple global split candidates in
a single live range split operation.

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

13 years agoTestcases for ARM assembly BLX/BL instructions.
Jim Grosbach [Wed, 13 Jul 2011 20:11:04 +0000 (20:11 +0000)]
Testcases for ARM assembly BLX/BL instructions.

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

13 years agoRange checking for 16-bit immediates in ARM assembly.
Jim Grosbach [Wed, 13 Jul 2011 20:10:10 +0000 (20:10 +0000)]
Range checking for 16-bit immediates in ARM assembly.

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

13 years agoRevert r135042. As Chris pointed out, it had no effect, and was based on
Jay Foad [Wed, 13 Jul 2011 20:05:31 +0000 (20:05 +0000)]
Revert r135042. As Chris pointed out, it had no effect, and was based on
a complete misunderstanding of the code.

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

13 years agoFix up TargetLoweringObjectFile ctors to properly initialize fields.
Evan Cheng [Wed, 13 Jul 2011 19:54:59 +0000 (19:54 +0000)]
Fix up TargetLoweringObjectFile ctors to properly initialize fields.

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

13 years agoGive the ARM BKPT instruction the right operand type.
Jim Grosbach [Wed, 13 Jul 2011 19:24:09 +0000 (19:24 +0000)]
Give the ARM BKPT instruction the right operand type.

The immediate is of limited range and the operand type should reflect that.

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

13 years agoChange test case, one that actually failed before my commit.
Evan Cheng [Wed, 13 Jul 2011 19:19:44 +0000 (19:19 +0000)]
Change test case, one that actually failed before my commit.

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

13 years agoAdd tests for ARM parsing of 'BKPT' instruction.
Jim Grosbach [Wed, 13 Jul 2011 19:17:36 +0000 (19:17 +0000)]
Add tests for ARM parsing of 'BKPT' instruction.

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

13 years agoFix copy-pasto.
Jim Grosbach [Wed, 13 Jul 2011 19:16:30 +0000 (19:16 +0000)]
Fix copy-pasto.

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

13 years agoAdd tests for ARM parsing of 'BIC' instruction.
Jim Grosbach [Wed, 13 Jul 2011 19:12:32 +0000 (19:12 +0000)]
Add tests for ARM parsing of 'BIC' instruction.

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

13 years agoAdd some FIXMEs.
Jim Grosbach [Wed, 13 Jul 2011 19:10:23 +0000 (19:10 +0000)]
Add some FIXMEs.

Keeping the instructions in alphabetical order, just like in the ARM ARM.
Adding FIXMEs for skipped instructions when adding tests out of order.

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

13 years agoRevert accidental commit.
Evan Cheng [Wed, 13 Jul 2011 19:09:08 +0000 (19:09 +0000)]
Revert accidental commit.

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

13 years agoIt's not safe to fold (fptrunc (sqrt (fpext x))) to (sqrtf x) if there is another...
Evan Cheng [Wed, 13 Jul 2011 19:08:16 +0000 (19:08 +0000)]
It's not safe to fold (fptrunc (sqrt (fpext x))) to (sqrtf x) if there is another use of sqrt. rdar://9763193

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

13 years agoAdd tests for ARM parsing of 'AND' instruction.
Jim Grosbach [Wed, 13 Jul 2011 18:55:14 +0000 (18:55 +0000)]
Add tests for ARM parsing of 'AND' instruction.

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

13 years agoImprove ARM assembly parsing diagnostics a bit.
Jim Grosbach [Wed, 13 Jul 2011 18:49:30 +0000 (18:49 +0000)]
Improve ARM assembly parsing diagnostics a bit.

Catch potential cascading errors on a malformed so_reg operand and bail after
the first error.

Add some tests for the diagnostics we do want.

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

13 years agoAdd tests for ARM parsing of 'ADD' instruction
Jim Grosbach [Wed, 13 Jul 2011 18:12:46 +0000 (18:12 +0000)]
Add tests for ARM parsing of 'ADD' instruction

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

13 years agoDestination register operand is optional for ADC and SBC ARM.
Jim Grosbach [Wed, 13 Jul 2011 17:57:17 +0000 (17:57 +0000)]
Destination register operand is optional for ADC and SBC ARM.

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

13 years agoFlesh out ARM Parser support for shifted-register operands.
Jim Grosbach [Wed, 13 Jul 2011 17:50:29 +0000 (17:50 +0000)]
Flesh out ARM Parser support for shifted-register operands.

Now works for parsing register shifted register and register shifted
immediate arithmetic instructions, including the 'rrx' rotate with extend.

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

13 years ago80 columns.
Jim Grosbach [Wed, 13 Jul 2011 17:25:55 +0000 (17:25 +0000)]
80 columns.

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

13 years agoUpdate MCParsedAsmOperand debug methods.
Jim Grosbach [Wed, 13 Jul 2011 15:34:57 +0000 (15:34 +0000)]
Update MCParsedAsmOperand debug methods.

Update the debug output interface for MCParsedAsmOperand to have a print()
method which takes an output stream argument, an << operator which invokes
the print method using the given stream, and a dump() method which prints
the operand to the dbgs() stream. This makes the interface more consistent
with the rest of LLVM, and more convenient to use at the debugger command
line.

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

13 years agoReally cache function types and anonymous struct types.
Jay Foad [Wed, 13 Jul 2011 10:39:49 +0000 (10:39 +0000)]
Really cache function types and anonymous struct types.

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

13 years agoConvert InsertValueInst and ExtractValueInst APIs to use ArrayRef.
Jay Foad [Wed, 13 Jul 2011 10:26:04 +0000 (10:26 +0000)]
Convert InsertValueInst and ExtractValueInst APIs to use ArrayRef.

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

13 years agoAdd some bits that I found useful when converting InsertValueInst and
Jay Foad [Wed, 13 Jul 2011 09:15:05 +0000 (09:15 +0000)]
Add some bits that I found useful when converting InsertValueInst and
ExtractValueInst APIs to use ArrayRef: a new constructor taking a
(begin, end) range, and operators == and != for element-wise comparison.

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

13 years agoAdd to RuntimeDyld support different object formats
Danil Malyshev [Wed, 13 Jul 2011 07:57:58 +0000 (07:57 +0000)]
Add to RuntimeDyld support different object formats

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

13 years agostop leaking all named struct types with an empty name. Thanks
Chris Lattner [Wed, 13 Jul 2011 04:22:39 +0000 (04:22 +0000)]
stop leaking all named struct types with an empty name.  Thanks
to Benjamin Kramer for steering me in the right direction here.

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

13 years agoAdd an entry.
Evan Cheng [Wed, 13 Jul 2011 01:33:00 +0000 (01:33 +0000)]
Add an entry.

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

13 years agoAVX Codegen support for 256-bit versions of vandps, vandpd, vorps, vorpd, vxorps...
Bruno Cardoso Lopes [Wed, 13 Jul 2011 01:15:33 +0000 (01:15 +0000)]
AVX Codegen support for 256-bit versions of vandps, vandpd, vorps, vorpd, vxorps, vxorpd

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

13 years agoDon't emit the FDE end label if the last thing emitted was a compact unwind and
Bill Wendling [Wed, 13 Jul 2011 00:49:09 +0000 (00:49 +0000)]
Don't emit the FDE end label if the last thing emitted was a compact unwind and
not the FDE

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

13 years agoAdd an assert (which should never trigger) that triggers on a testcase I'm looking at.
Eli Friedman [Wed, 13 Jul 2011 00:44:29 +0000 (00:44 +0000)]
Add an assert (which should never trigger) that triggers on a testcase I'm looking at.

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

13 years agoImprove codegen for select's:
Evan Cheng [Wed, 13 Jul 2011 00:42:17 +0000 (00:42 +0000)]
Improve codegen for select's:
if (x != 0) x = 1
if (x == 1) x = 1

Previous codegen looks like this:
        mov     r1, r0
        cmp     r1, #1
        mov     r0, #0
        moveq   r0, #1

The naive lowering select between two different values. It should recognize the
test is equality test so it's more a conditional move rather than a select:
        cmp     r0, #1
        movne   r0, #0

rdar://9758317

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

13 years agoAssign variable before we test it.
Bill Wendling [Wed, 13 Jul 2011 00:23:39 +0000 (00:23 +0000)]
Assign variable before we test it.

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

13 years agoFix obvious think-o.
Bill Wendling [Wed, 13 Jul 2011 00:20:09 +0000 (00:20 +0000)]
Fix obvious think-o.

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

13 years agoClean up the handling of an EBP/RBP unwind frame pointer. In particular, don't
Bill Wendling [Wed, 13 Jul 2011 00:16:14 +0000 (00:16 +0000)]
Clean up the handling of an EBP/RBP unwind frame pointer. In particular, don't
assert when the frame pointer is -1 (i.e., the function is "frameless").

Still to do: "frameless" unwind information.

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

13 years agoThere is a cyclic dependency between MC and Target if this method is out-of-line.
Bill Wendling [Tue, 12 Jul 2011 22:35:01 +0000 (22:35 +0000)]
There is a cyclic dependency between MC and Target if this method is out-of-line.

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

13 years agoRemove the const from Type after of Jay deconstify work.
Francois Pichet [Tue, 12 Jul 2011 22:04:11 +0000 (22:04 +0000)]
Remove the const from Type after of Jay deconstify work.

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

13 years agoDelete StructType bodies when destroying a StructType.
Benjamin Kramer [Tue, 12 Jul 2011 18:22:07 +0000 (18:22 +0000)]
Delete StructType bodies when destroying a StructType.

Leak found by valgrind.

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

13 years agoAdd check for predicate w/o S bit.
Jim Grosbach [Tue, 12 Jul 2011 16:25:04 +0000 (16:25 +0000)]
Add check for predicate w/o S bit.

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

13 years agoImprove test cases from r134746.
Jim Grosbach [Tue, 12 Jul 2011 16:06:01 +0000 (16:06 +0000)]
Improve test cases from r134746.

Use memory barriers to force if-conversion off for these tests instead of
the internal llc command line option ifcvt-limit.

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

13 years agoReverted 134901 because of 134959. Did not use svn merge -r but rather:
Garrison Venn [Tue, 12 Jul 2011 15:34:42 +0000 (15:34 +0000)]
Reverted 134901 because of 134959. Did not use svn merge -r but rather:

1,$s/llvm::Type::getInt\(..\)Ty(builder.getContext())/builder.getInt\1Ty()/g
1,$s/builder.getInt\(..*\)Ty()->getPointerTo()/builder.getInt\1PtrTy()/g

vi sub commands (second one was not a reversion but requested by
Tobias Grosser.

Mod was tested, but other examples have failed to build as they are currently
being thrashed with the const qualifier removal change.

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

13 years agoSecond attempt at de-constifying LLVM Types in FunctionType::get(),
Jay Foad [Tue, 12 Jul 2011 14:06:48 +0000 (14:06 +0000)]
Second attempt at de-constifying LLVM Types in FunctionType::get(),
StructType::get() and TargetData::getIntPtrType().

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

13 years agoVectorType is also a SequentialType
Tobias Grosser [Tue, 12 Jul 2011 11:37:02 +0000 (11:37 +0000)]
VectorType is also a SequentialType

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

13 years agoRemove IntegerType constness from TargetData
Tobias Grosser [Tue, 12 Jul 2011 11:36:58 +0000 (11:36 +0000)]
Remove IntegerType constness from TargetData

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

13 years agoFix the BrainF build.
Francois Pichet [Tue, 12 Jul 2011 08:43:36 +0000 (08:43 +0000)]
Fix the BrainF build.

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

13 years agosimplify assertions to not be completely redundant.
Chris Lattner [Tue, 12 Jul 2011 05:26:21 +0000 (05:26 +0000)]
simplify assertions to not be completely redundant.

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

13 years agomake the IRBuilder type methods return non-const types.
Chris Lattner [Tue, 12 Jul 2011 04:14:22 +0000 (04:14 +0000)]
make the IRBuilder type methods return non-const types.

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

13 years agoComment correction.
Andrew Trick [Tue, 12 Jul 2011 03:39:22 +0000 (03:39 +0000)]
Comment correction.

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

13 years agoRevert r134893 and r134888 (and related patches in other trees). It was causing
Bill Wendling [Tue, 12 Jul 2011 01:15:52 +0000 (01:15 +0000)]
Revert r134893 and r134888 (and related patches in other trees). It was causing
an assert on Darwin llvm-gcc builds.

Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.llvm-gcc-i386-darwin9-RA/llvm.src/lib/VMCore/Instructions.cpp, li\
ne 2067.
etc.

http://smooshlab.apple.com:8013/builders/llvm-gcc-i386-darwin9-RA/builds/2354

--- Reverse-merging r134893 into '.':
U    include/llvm/Target/TargetData.h
U    include/llvm/DerivedTypes.h
U    tools/bugpoint/ExtractFunction.cpp
U    unittests/Support/TypeBuilderTest.cpp
U    lib/Target/ARM/ARMGlobalMerge.cpp
U    lib/Target/TargetData.cpp
U    lib/VMCore/Constants.cpp
U    lib/VMCore/Type.cpp
U    lib/VMCore/Core.cpp
U    lib/Transforms/Utils/CodeExtractor.cpp
U    lib/Transforms/Instrumentation/ProfilingUtils.cpp
U    lib/Transforms/IPO/DeadArgumentElimination.cpp
U    lib/CodeGen/SjLjEHPrepare.cpp
--- Reverse-merging r134888 into '.':
G    include/llvm/DerivedTypes.h
U    include/llvm/Support/TypeBuilder.h
U    include/llvm/Intrinsics.h
U    unittests/Analysis/ScalarEvolutionTest.cpp
U    unittests/ExecutionEngine/JIT/JITTest.cpp
U    unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp
U    unittests/VMCore/PassManagerTest.cpp
G    unittests/Support/TypeBuilderTest.cpp
U    lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp
U    lib/Target/Blackfin/BlackfinIntrinsicInfo.cpp
U    lib/VMCore/IRBuilder.cpp
G    lib/VMCore/Type.cpp
U    lib/VMCore/Function.cpp
G    lib/VMCore/Core.cpp
U    lib/VMCore/Module.cpp
U    lib/AsmParser/LLParser.cpp
U    lib/Transforms/Utils/CloneFunction.cpp
G    lib/Transforms/Utils/CodeExtractor.cpp
U    lib/Transforms/Utils/InlineFunction.cpp
U    lib/Transforms/Instrumentation/GCOVProfiling.cpp
U    lib/Transforms/Scalar/ObjCARC.cpp
U    lib/Transforms/Scalar/SimplifyLibCalls.cpp
U    lib/Transforms/Scalar/MemCpyOptimizer.cpp
G    lib/Transforms/IPO/DeadArgumentElimination.cpp
U    lib/Transforms/IPO/ArgumentPromotion.cpp
U    lib/Transforms/InstCombine/InstCombineCompares.cpp
U    lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
U    lib/Transforms/InstCombine/InstCombineCalls.cpp
U    lib/CodeGen/DwarfEHPrepare.cpp
U    lib/CodeGen/IntrinsicLowering.cpp
U    lib/Bitcode/Reader/BitcodeReader.cpp

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

13 years agoTypeMap had a destructor that destroyed the types it held. DenseMap did not, so
Nick Lewycky [Tue, 12 Jul 2011 00:26:08 +0000 (00:26 +0000)]
TypeMap had a destructor that destroyed the types it held. DenseMap did not, so
destroy those types in ~LLVMContext.

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

13 years agoindvars: Code reorganization in preparation for
Andrew Trick [Tue, 12 Jul 2011 00:08:50 +0000 (00:08 +0000)]
indvars: Code reorganization in preparation for
LinearFunctionTestReplace rewrite. No functionality.

I've been wanting to group the indvar subphases into sections and
order them by their logical sequence. My next checkin adds functions
related to LFTR, and doing the reorg now should help reviewers. Since,
most of the code in IndVarSimplify.cpp has recently been replaced or
will be replaced soon, obscuring blame should not be an issue. This
seems like an ideal time to shuffle the code around.

I'm happy to take more suggestions for cleaning up the code. Or if
you've been wanting to cleanup anything in this file yourself, now is
a good time.

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

13 years agoRevert r134921, 134917, 134908 and 134907. They're causing failures
Eric Christopher [Mon, 11 Jul 2011 23:06:52 +0000 (23:06 +0000)]
Revert r134921, 134917, 134908 and 134907. They're causing failures
in multiple buildbots.

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

13 years agofix some examples
John Wiegley [Mon, 11 Jul 2011 22:39:46 +0000 (22:39 +0000)]
fix some examples

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

13 years agoFix LTO after the recent MC subtarget refactoring.
Cameron Zwarich [Mon, 11 Jul 2011 22:19:51 +0000 (22:19 +0000)]
Fix LTO after the recent MC subtarget refactoring.

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

13 years agoMost MCCodeEmitter's don't meed MCContext.
Evan Cheng [Mon, 11 Jul 2011 21:24:15 +0000 (21:24 +0000)]
Most MCCodeEmitter's don't meed MCContext.

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

13 years agoUse get(0 Instead of Create()
David Greene [Mon, 11 Jul 2011 20:55:22 +0000 (20:55 +0000)]
Use get(0 Instead of Create()

Respond to some feedback asking for a name change.

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

13 years agoDisassembler doesn't need TargetMachine anymore.
Evan Cheng [Mon, 11 Jul 2011 20:40:56 +0000 (20:40 +0000)]
Disassembler doesn't need TargetMachine anymore.

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

13 years agostruct Init -> class Init.
Evan Cheng [Mon, 11 Jul 2011 20:23:13 +0000 (20:23 +0000)]
struct Init -> class Init.

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

13 years agoFix Build
David Greene [Mon, 11 Jul 2011 18:59:29 +0000 (18:59 +0000)]
Fix Build

Update the tag for Init to match how it's defined.

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

13 years ago[AVX] Make Inits Foldable
David Greene [Mon, 11 Jul 2011 18:25:51 +0000 (18:25 +0000)]
[AVX] Make Inits Foldable

Manage Inits in a FoldingSet.  This provides several benefits:

- Memory for Inits is properly managed

- Duplicate Inits are folded into Flyweights, saving memory

- It enforces const-correctness, protecting against certain classes
  of bugs

The above benefits allow Inits to be used in more contexts, which in
turn provides more dynamism to TableGen.  This enhanced capability
will be used by the AVX code generator to a fold common patterns
together.

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

13 years agoResynchronize EDInfo.h and EDEmitter.cpp.
Shantonu Sen [Mon, 11 Jul 2011 17:57:30 +0000 (17:57 +0000)]
Resynchronize EDInfo.h and EDEmitter.cpp.
The enum names as well as order (i.e. value)
had skewed, which means that consumers of the
tablegen-ed table would see different values than
intended. Make both files have a superset of enums,
and add classification as needed for numMCOperands.

Reviewed by Owen Anderson

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

13 years agoFix recognition of ARM 'adcs' mnemonic.
Jim Grosbach [Mon, 11 Jul 2011 17:09:57 +0000 (17:09 +0000)]
Fix recognition of ARM 'adcs' mnemonic.

The 'CS' is not a predication suffix in this case.

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

13 years agoSimplify printing of ARM shifted immediates.
Jim Grosbach [Mon, 11 Jul 2011 16:48:36 +0000 (16:48 +0000)]
Simplify printing of ARM shifted immediates.

Print shifted immediate values directly rather than as a payload+shifter
value pair. This makes for more readable output assembly code, simplifies
the instruction printer, and is consistent with how Thumb immediates are
 displayed.

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

13 years agoModified demo to work with non const Type parameters as is required by new
Garrison Venn [Mon, 11 Jul 2011 16:31:53 +0000 (16:31 +0000)]
Modified demo to work with non const Type parameters as is required by new
type system. However most of these modifications were due to IRBuilder
(IRBuilderBase), not having been modified to NOT return such const qualified
free types. If IRBuilder does not change, as can also be seen in its
instruction creation methods, to use const free types, it may be useful to have
ExceptionDemo drop IRBuilder usage. Modifying builder.getInt32Ty() to
llvm::Type::getInt32Ty(builder.getContext()) is pretty ugly.

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

13 years agotest/CodeGen/PowerPC/vector.ll: Tweak redirection >%t >%t to >%t >>%t. See also r1348...
NAKAMURA Takumi [Mon, 11 Jul 2011 16:21:52 +0000 (16:21 +0000)]
test/CodeGen/PowerPC/vector.ll: Tweak redirection >%t >%t to >%t >>%t. See also r134814 (test/CodeGen/X86/vector.ll).

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

13 years agoDe-constify Types in StructType::get() and TargetData::getIntPtrType().
Jay Foad [Mon, 11 Jul 2011 09:56:20 +0000 (09:56 +0000)]
De-constify Types in StructType::get() and TargetData::getIntPtrType().

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

13 years agoAdd a missing test for r134882.
Cameron Zwarich [Mon, 11 Jul 2011 08:35:17 +0000 (08:35 +0000)]
Add a missing test for r134882.

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

13 years agoDe-constify Types in FunctionType::get().
Jay Foad [Mon, 11 Jul 2011 07:56:41 +0000 (07:56 +0000)]
De-constify Types in FunctionType::get().

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

13 years agoRemove mentions of type planes.
Jay Foad [Mon, 11 Jul 2011 07:28:49 +0000 (07:28 +0000)]
Remove mentions of type planes.

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

13 years ago- Eliminate MCCodeEmitter's dependency on TargetMachine. It now uses MCInstrInfo
Evan Cheng [Mon, 11 Jul 2011 03:57:24 +0000 (03:57 +0000)]
- Eliminate MCCodeEmitter's dependency on TargetMachine. It now uses MCInstrInfo
  and MCSubtargetInfo.
- Added methods to update subtarget features (used when targets automatically
  detect subtarget features or switch modes).
- Teach X86Subtarget to update MCSubtargetInfo features bits since the
  MCSubtargetInfo layer can be shared with other modules.
- These fixes .code 16 / .code 32 support since mode switch is updated in
  MCSubtargetInfo so MC code emitter can do the right thing.

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

13 years agoDon't duplicate the work done by a gep into a "bitcast" if the gep has
Rafael Espindola [Mon, 11 Jul 2011 03:43:47 +0000 (03:43 +0000)]
Don't duplicate the work done by a gep into a "bitcast" if the gep has
more than one use.

Fixes PR10322.

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

13 years agoFix <rdar://problem/9751331>.
Cameron Zwarich [Mon, 11 Jul 2011 01:29:42 +0000 (01:29 +0000)]
Fix <rdar://problem/9751331>.

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

13 years agoSilence -Wunused-variable in release builds.
Chandler Carruth [Sun, 10 Jul 2011 09:45:35 +0000 (09:45 +0000)]
Silence -Wunused-variable in release builds.

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

13 years agoMake the destructor virtual to silence GCC's -Wnon-virtual-dtor. Let me
Chandler Carruth [Sun, 10 Jul 2011 08:38:12 +0000 (08:38 +0000)]
Make the destructor virtual to silence GCC's -Wnon-virtual-dtor. Let me
know if there is some problem with this destructor being virtual...

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

13 years agoUse BranchProbability instead of floating points in IfConverter.
Jakub Staszak [Sun, 10 Jul 2011 02:58:07 +0000 (02:58 +0000)]
Use BranchProbability instead of floating points in IfConverter.

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

13 years ago- Make BranchProbability constructor public.
Jakub Staszak [Sun, 10 Jul 2011 02:12:39 +0000 (02:12 +0000)]
- Make BranchProbability constructor public.
- Add getCompl() method.

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

13 years agoDon't analyze block if it's not considered for ifcvt anymore.
Jakub Staszak [Sun, 10 Jul 2011 02:00:16 +0000 (02:00 +0000)]
Don't analyze block if it's not considered for ifcvt anymore.

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

13 years agofinish a thought.
Chris Lattner [Sun, 10 Jul 2011 00:29:18 +0000 (00:29 +0000)]
finish a thought.

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

13 years agoMove the loads after the calls so that the fix for
Rafael Espindola [Sat, 9 Jul 2011 23:53:58 +0000 (23:53 +0000)]
Move the loads after the calls so that the fix for
PR10292 doesn't show that the loads don't alias
the allocas.

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

13 years agoUse CHECK-NEXT.
Rafael Espindola [Sat, 9 Jul 2011 22:56:50 +0000 (22:56 +0000)]
Use CHECK-NEXT.

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

13 years agoRemove tests for APIs that were removed.
Nick Lewycky [Sat, 9 Jul 2011 18:55:51 +0000 (18:55 +0000)]
Remove tests for APIs that were removed.

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

13 years agoUpdate OCaml bindings. Opaque types are gone, type holders are gone and the
Nick Lewycky [Sat, 9 Jul 2011 18:29:33 +0000 (18:29 +0000)]
Update OCaml bindings. Opaque types are gone, type holders are gone and the
module operations that operate on type names are gone.

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

13 years agothe various ConstantExpr::get*Ty methods existed to work with issues around
Chris Lattner [Sat, 9 Jul 2011 18:23:52 +0000 (18:23 +0000)]
the various ConstantExpr::get*Ty methods existed to work with issues around
type refinement.  Zap them now that type refinement is toast.

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

13 years agodon't load element before checking to see if it is valid.
Chris Lattner [Sat, 9 Jul 2011 18:23:26 +0000 (18:23 +0000)]
don't load element before checking to see if it is valid.

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

13 years agoEliminate the WriteTypeSymbolic function. Now that types know
Chris Lattner [Sat, 9 Jul 2011 18:03:13 +0000 (18:03 +0000)]
Eliminate the WriteTypeSymbolic function.  Now that types know
their names, we don't need a module around to print them.

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

13 years agostop using WriteTypeSymbolic.
Chris Lattner [Sat, 9 Jul 2011 18:02:13 +0000 (18:02 +0000)]
stop using WriteTypeSymbolic.

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

13 years agoremove the DerivedType which isn't adding value anymore.
Chris Lattner [Sat, 9 Jul 2011 17:59:15 +0000 (17:59 +0000)]
remove the DerivedType which isn't adding value anymore.

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

13 years agoLand the long talked about "type system rewrite" patch. This
Chris Lattner [Sat, 9 Jul 2011 17:41:24 +0000 (17:41 +0000)]
Land the long talked about "type system rewrite" patch.  This
patch brings numerous advantages to LLVM.  One way to look at it
is through diffstat:
 109 files changed, 3005 insertions(+), 5906 deletions(-)

Removing almost 3K lines of code is a good thing.  Other advantages
include:

1. Value::getType() is a simple load that can be CSE'd, not a mutating
   union-find operation.
2. Types a uniqued and never move once created, defining away PATypeHolder.
3. Structs can be "named" now, and their name is part of the identity that
   uniques them.  This means that the compiler doesn't merge them structurally
   which makes the IR much less confusing.
4. Now that there is no way to get a cycle in a type graph without a named
   struct type, "upreferences" go away.
5. Type refinement is completely gone, which should make LTO much MUCH faster
   in some common cases with C++ code.
6. Types are now generally immutable, so we can use "Type *" instead
   "const Type *" everywhere.

Downsides of this patch are that it removes some functions from the C API,
so people using those will have to upgrade to (not yet added) new API.
"LLVM 3.0" is the right time to do this.

There are still some cleanups pending after this, this patch is large enough
as-is.

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

13 years agoadd a #include
Chris Lattner [Sat, 9 Jul 2011 17:00:38 +0000 (17:00 +0000)]
add a #include

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

13 years agofix a really bad bug that would cause nested cursors to break,
Chris Lattner [Sat, 9 Jul 2011 17:00:12 +0000 (17:00 +0000)]
fix a really bad bug that would cause nested cursors to break,
used by the new bitcode reader.

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

13 years agomore tests not making the jump into the brave new world.
Chris Lattner [Sat, 9 Jul 2011 16:57:10 +0000 (16:57 +0000)]
more tests not making the jump into the brave new world.

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

13 years agoremove some crufy old tests that aren't adding much value
Chris Lattner [Sat, 9 Jul 2011 16:55:16 +0000 (16:55 +0000)]
remove some crufy old tests that aren't adding much value

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

13 years agoremove a test that doesn't make sense in the new world.
Chris Lattner [Sat, 9 Jul 2011 16:52:42 +0000 (16:52 +0000)]
remove a test that doesn't make sense in the new world.

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

13 years agotest/CodeGen/X86/vector.ll: Tweak temporary output to appease Win32 hosts.
NAKAMURA Takumi [Sat, 9 Jul 2011 10:22:28 +0000 (10:22 +0000)]
test/CodeGen/X86/vector.ll: Tweak temporary output to appease Win32 hosts.

With Lit (not bash) in a test, multiple redirects >%t might open(%t, "w") multiple. It can be avoided if latter redirect is >>%t.

It might work even if ">/dev/null" were used.

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

13 years agoWindows/DynamicLibrary.inc: Fix trivial warnings. Thanks to John Myers!
NAKAMURA Takumi [Sat, 9 Jul 2011 08:41:20 +0000 (08:41 +0000)]
Windows/DynamicLibrary.inc: Fix trivial warnings. Thanks to John Myers!

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