Andrew Trick
1cabe54fab
Move trip count discovery outside of the generic LoopUnroll helper. This
...
removes its dependence on canonical induction variables.
llvm-svn: 135829
2011-07-23 00:33:05 +00:00
Andrew Trick
279e7a6c83
whitespace
...
llvm-svn: 135828
2011-07-23 00:29:16 +00:00
Evan Cheng
6376593ed1
createXXXMCCodeGenInfo should be static.
...
llvm-svn: 135826
2011-07-23 00:01:04 +00:00
Evan Cheng
ad5f485957
Sink ARM mc routines into MCTargetDesc.
...
llvm-svn: 135825
2011-07-23 00:00:19 +00:00
Jim Grosbach
801e0a3fde
ARM SSAT instruction 5-bit immediate handling.
...
The immediate is in the range 1-32, but is encoded as 0-31 in a 5-bit bitfield.
Update the representation such that we store the operand as 0-31, allowing us
to remove the encoder method and the special case handling in the disassembler.
Update the assembly parser and the instruction printer accordingly.
llvm-svn: 135823
2011-07-22 23:16:18 +00:00
Dan Gohman
6320f52ff4
Move the last uses of RetainFunc etc. over to using getRetainCallee() etc.
...
so that a declaration for objc_retain is created when needed if it doesn't
already exist. rdar://9825114.
llvm-svn: 135821
2011-07-22 22:29:21 +00:00
Oscar Fuentes
383c487644
Teach cmake configured headers about LLVM_NATIVE_TARGETMC
...
llvm-svn: 135820
2011-07-22 22:21:47 +00:00
Jim Grosbach
d69b3423a8
Add FIXME
...
llvm-svn: 135819
2011-07-22 22:15:38 +00:00
Jim Grosbach
bc5d709ad9
ARM encoding and assembly parsing tests for SMULWB, SMULWT, SMUSD and SMUSDX.
...
llvm-svn: 135818
2011-07-22 22:13:00 +00:00
Jim Grosbach
e7e1e163db
ARM assembly parsing and encoding updates.
...
Tests for SMULBB, SMLALBT, SMLALTB, SMLALTT, and SMULL. Fix parsing of SMULLS.
llvm-svn: 135817
2011-07-22 22:06:05 +00:00
Benjamin Kramer
b1561f1e23
Use the enum value for RegClassIDs.
...
llvm-svn: 135816
2011-07-22 22:01:58 +00:00
Evan Cheng
8c886a40d2
Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,
...
InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC.
llvm-svn: 135812
2011-07-22 21:58:54 +00:00
Chris Lattner
2e3b0769da
add section to ToC
...
llvm-svn: 135811
2011-07-22 21:36:29 +00:00
Jim Grosbach
999afadffa
ARM assembly parsing and encoding tests.
...
Add tests for SMLSD, SMLSDX, SMLSLD, SMLSLDX, SMMLA, SMMLAR, SMMLS, SMMLSR,
SMMUL, SMMULR, SMUAD and SMUADX.
llvm-svn: 135810
2011-07-22 21:34:56 +00:00
Chris Lattner
3dbcd8eca7
write the long-overdue strings section of the data structure guide.
...
llvm-svn: 135809
2011-07-22 21:34:12 +00:00
Bill Wendling
4d9aa512f8
Emit the __compact_unwind section first. If there are any frames which weren't
...
emitted, emit them next as CIE/FDEs.
llvm-svn: 135807
2011-07-22 21:18:59 +00:00
Bill Wendling
53b7402486
Add a method to set the compact unwind info.
...
llvm-svn: 135806
2011-07-22 21:17:05 +00:00
Bill Wendling
fac2ebf7e5
Add a method to get the list of FrameInfos.
...
llvm-svn: 135805
2011-07-22 21:16:32 +00:00
Bruno Cardoso Lopes
7a2075511b
Fix test check!
...
llvm-svn: 135802
2011-07-22 20:55:28 +00:00
Bruno Cardoso Lopes
a89039998d
Fix PR10422 by adding the necessary AVX UCOMISD memory versions to
...
load folding logic
llvm-svn: 135801
2011-07-22 20:53:20 +00:00
Jim Grosbach
5b84e16503
ARM assembly parsing and encoding tests for SMLAWB/SMLAWT.
...
llvm-svn: 135800
2011-07-22 20:51:24 +00:00
Chris Lattner
355f4bb960
move the section for string-like containers to follow the section for sequential containers.
...
llvm-svn: 135799
2011-07-22 20:46:49 +00:00
Jim Grosbach
e2220221a2
ARM assembly parsing and encoding tests.
...
Tests for SMLAL, SMLALBB, SMLALBT, SMLALTB, SMLALTT, SMLALD, and SMLALDX
instructions.
llvm-svn: 135798
2011-07-22 20:30:40 +00:00
Jim Grosbach
8dfcc0bb92
ARM assembly parsing and encoding of SMLAL instruction.
...
Fix parsing of carry-setting variant SMLALS and add tests.
llvm-svn: 135797
2011-07-22 20:18:21 +00:00
Jim Grosbach
d7c8c35301
ARM encoding and assembly parsing of SMLAD{X} instructions.
...
Fix encoding of destination register. Add tests.
llvm-svn: 135796
2011-07-22 20:11:20 +00:00
Jim Grosbach
0b28f0cca2
ARM testcases for assembly parsing and encoding SMLA* instructions.
...
llvm-svn: 135795
2011-07-22 20:01:34 +00:00
Bruno Cardoso Lopes
d23a324132
Add v8f32->v8i32 bitcast. Fixes PR10440
...
llvm-svn: 135794
2011-07-22 19:51:02 +00:00
Rafael Espindola
77242dd537
Turn shuffles into unpacks for VT == MVT::v2i64 and MVT::v2f64
...
too. Patch by Jeff Muizelaar.
llvm-svn: 135789
2011-07-22 18:56:05 +00:00
Dan Gohman
c535278cf1
Fix x86's XALUO lowering to return its replacement values instead
...
of doing the RAUW calls for the overflow value itself. This makes
it more consistent with how the rest of LegalizeDAG works.
llvm-svn: 135788
2011-07-22 18:45:15 +00:00
Benjamin Kramer
39e05ac3d7
llvm-objdump: Don't ignore errors from raw_fd_ostream.
...
llvm-svn: 135787
2011-07-22 18:35:11 +00:00
Benjamin Kramer
cb2d7bee35
llvm-objdump: Skip branches that leave the current function.
...
In "normal" code these only happen when disassembling data, so we
won't lose anything if we just drop them.
llvm-svn: 135786
2011-07-22 18:35:09 +00:00
Owen Anderson
3fa7ca84d9
Fix test failures caused by my so_reg refactoring.
...
llvm-svn: 135785
2011-07-22 18:30:30 +00:00
Jim Grosbach
d1f8bde10f
ARM assembly parsing and encoding for SMC instruction.
...
llvm-svn: 135782
2011-07-22 18:13:31 +00:00
Jim Grosbach
bc9d841878
Clean up a few more comments.
...
These instruction definitions are for the assembler, too, not just the
disassembler.
llvm-svn: 135781
2011-07-22 18:06:01 +00:00
Jim Grosbach
24ace20824
ARM encoding and assembly parsing tests.
...
Add tests for SHADD8, SHADD16, SHASX, SHSUB8, and SHSUB16.
llvm-svn: 135780
2011-07-22 18:04:48 +00:00
Jim Grosbach
163eb27c1a
Tidy up.
...
llvm-svn: 135779
2011-07-22 18:04:10 +00:00
Jim Grosbach
39f9388a9d
Thumb assembly support for SETEND instruction.
...
llvm-svn: 135778
2011-07-22 17:52:23 +00:00
Jim Grosbach
9afae0d01b
Tidy up.
...
llvm-svn: 135777
2011-07-22 17:46:13 +00:00
Jim Grosbach
0a547701a4
ARM assembly parsing and encoding for SETEND instruction.
...
Add parsing and diagnostics for malformed inputs. Tests for diagnostics and
for correct encodings.
llvm-svn: 135776
2011-07-22 17:44:50 +00:00
Jim Grosbach
4535b9194a
ARM assembly parsing and encoding tests for SEL instruction.
...
llvm-svn: 135772
2011-07-22 16:59:33 +00:00
Jim Grosbach
41d084f807
Tidy up.
...
llvm-svn: 135771
2011-07-22 16:59:04 +00:00
Benjamin Kramer
5814d9d35b
Remove unused variables.
...
llvm-svn: 135768
2011-07-22 16:06:09 +00:00
Jay Foad
17bab44308
Fix more MSVC warnings caused by a cases I missed when converting
...
ConstantExpr::getGetElementPtr to use ArrayRef.
llvm-svn: 135762
2011-07-22 08:52:50 +00:00
Jay Foad
040dd82f44
Convert IRBuilder::CreateGEP and IRBuilder::CreateInBoundsGEP to use
...
ArrayRef.
llvm-svn: 135761
2011-07-22 08:16:57 +00:00
Chandler Carruth
43025a0869
Move TargetRegistry.cpp from lib/Support to lib/Target where it belongs.
...
The header file was already properly located. The previous need for it
in Support had to do with the version string printing which was fixed in
r135757.
Also update build dependencies where libraries that needed the
functionality of the Target library (in the form of the TargetRegistry)
were picking it up via Support. This is pretty pervasive, essentially
every TargetInfo library (ARMInfo, etc) uses TargetRegistry, making it
depend on Target. All of these were previously just sneaking by.
llvm-svn: 135760
2011-07-22 08:16:53 +00:00
Chandler Carruth
1108b1671c
Update the CMake library dependencies. These shifts are the result of
...
Evan's recent refactorings (I believe). Specifically, MCDisassembler no
longer depends on Target, and ARMDisassembler no longer depends on
CodeGen. The added dependencies from ARMAsmParser to ARMDesc looks
correct based on header file inclusion.
llvm-svn: 135759
2011-07-22 08:05:47 +00:00
Jay Foad
71f19ac6af
Fix an MSVC warning, caused by a case I missed when converting
...
ConstantExpr::getGetElementPtr to use ArrayRef.
llvm-svn: 135758
2011-07-22 07:54:01 +00:00
Chandler Carruth
2d71c421f9
Move the registered target printing in version strings completely out of
...
the Support library. Now its part of the TargetRegistry, and the three
commands that care about this explicitly register this extra bit of
version information.
The set of commands which care was computed by intersecting those which
use the Support library's version string printing and those that
initialize all the registered targets in a way that produces
a meaningful list. The only odd ball out is that 'clang -cc1as -version'
no longer prints the registered targets. I don't think anyone is really
interested in that (especially as the fact that llvm-mc does so is under
a FIXME), but if someone really does want this back I'll happily apply
the same patch there.
llvm-svn: 135757
2011-07-22 07:50:48 +00:00
Chandler Carruth
2baac02c94
Move the logic for printing the registered targets into a static
...
function on the TargetRegistry. Also clean it up and use the modern LLVM
utility libraries available instead of rolling a few things manually.
llvm-svn: 135756
2011-07-22 07:50:44 +00:00
Chandler Carruth
ea7e55272c
Add an extension point to the CommandLine library where clients can
...
register extra version information to be printed. This is designed to
allow those tools which link in various targets to also print those
registered targets under --version.
Currently this printing logic is embedded into the Support library
directly; a huge layering violation. This is the first step to hoisting
it out into the tools without adding lots of duplicated code.
llvm-svn: 135755
2011-07-22 07:50:40 +00:00
NAKAMURA Takumi
af8d50ddb3
lib/Support/Triple.cpp: Recognize "-march=ppc32" to llc properly, as quick hack.
...
FIXME: There is an inconsistency. llvm::Triple does not understand "ppc32" and PowerPC/TargetInfo holds "ppc32".
llvm-svn: 135745
2011-07-22 04:02:22 +00:00
Eli Friedman
f12e4e914b
Some LangRef tweaks, per Dan's comments.
...
llvm-svn: 135744
2011-07-22 03:04:45 +00:00
Jakub Staszak
b82bbf40bb
Allow getBlockFreq to return 0.
...
llvm-svn: 135742
2011-07-22 02:24:57 +00:00
Benjamin Kramer
959b7e9df7
GCC complains about the angle of this line.
...
Remove the escaped newline.
llvm-svn: 135739
2011-07-22 01:02:57 +00:00
Jakub Staszak
7987ea7460
Revert patch which broke some IfConversion tests.
...
llvm-svn: 135738
2011-07-22 00:55:15 +00:00
Benjamin Kramer
1eb27ae580
Teach tblgen to emit MCRegisterClasses.
...
- This currently introduces more instances of the static DenseSet dtor, but that should be fixable.
llvm-svn: 135735
2011-07-22 00:44:39 +00:00
Jakub Staszak
76d711582c
Fix typo in #include which revealed in the case-sensitive filesystem.
...
llvm-svn: 135734
2011-07-22 00:39:00 +00:00
Bruno Cardoso Lopes
1872173841
Remove the 128-bit special handling from SCALAR_TO_VECTOR. This isn't
...
the way to go. Doing this here will prevent several node matches later,
and would have to force looking all the way through several
VINSERTF128/VEXTRACTF128 chains to optimize simple things.
llvm-svn: 135730
2011-07-22 00:15:10 +00:00
Bruno Cardoso Lopes
612e56174b
-Inspected a AVX code block added by someone in early Feb. This was never used
...
and was actually very wrong, fix it and make it simpler. Also remove the
ConcatVectors function, which is unused now.
- Fix a introduction of useless nodes in r126664 and r126264. The
VUNPCKL* should never be introduced cause we don't want duplicate
nodes for 128 AVX and non-AVX modes, the actual instruction
difference only exists during isel, but not for target specific DAG
nodes. We only introduce V* target nodes when there is no 128-bit
version already there.
- Fix a fragile test and make it more useful.
llvm-svn: 135729
2011-07-22 00:15:07 +00:00
Bruno Cardoso Lopes
14a95bda04
Although we already support this, add testcases for consistency
...
llvm-svn: 135728
2011-07-22 00:15:03 +00:00
Bruno Cardoso Lopes
91eff5140f
Add a DAGCombine for transforming 128->256 casts into a simple
...
vxorps + vinsertf128 pair of instructions
llvm-svn: 135727
2011-07-22 00:15:00 +00:00
Bruno Cardoso Lopes
dbebd01269
Introduce a new function to lower 256-bit vectors which are not
...
direclty supported and should be promoted and handled by smaller
shuffles
llvm-svn: 135726
2011-07-22 00:14:56 +00:00
Bruno Cardoso Lopes
95d037721b
Rename function to be more specific and be more strict about its usage
...
llvm-svn: 135725
2011-07-22 00:14:53 +00:00
Jakub Staszak
44860314d2
Use MachineBranchProbabilityInfo instead of MachineLoopInfo in IfConversion.
...
llvm-svn: 135724
2011-07-21 23:48:55 +00:00
Owen Anderson
0491270f99
Get rid of the extraneous GPR operand on so_reg_imm operands, which in turn necessitates a lot of changes to related bits.
...
llvm-svn: 135722
2011-07-21 23:38:37 +00:00
Dan Gohman
e106aee6f5
Fix MergeInVectorType to check for vector types with the same alloc
...
size but different element types, so that it filters out the cases
that CreateShuffleVectorCast doesn't handle. This fixes rdar://9786827.
llvm-svn: 135721
2011-07-21 23:30:09 +00:00
Jim Grosbach
72e7c4f9ac
ARM Asm parser range checking for [0,31] immediates.
...
llvm-svn: 135719
2011-07-21 23:26:25 +00:00
Jim Grosbach
3354674b48
ARM parsing and encoding tests for SBC instruction.
...
llvm-svn: 135718
2011-07-21 23:03:59 +00:00
Benjamin Kramer
737a3dac02
Initialize DenseSets lazily.
...
llvm-svn: 135717
2011-07-21 23:03:59 +00:00
Jim Grosbach
8dbf59d041
ARM testcases for SADD/SASX parsing and encoding.
...
llvm-svn: 135715
2011-07-21 23:00:49 +00:00
Jakub Staszak
cb7c0a4927
Add missing getAnalysisUsage in MachineBlockFrequency.
...
llvm-svn: 135714
2011-07-21 22:59:09 +00:00
Jim Grosbach
2a0320c877
ARM assembly parsing support for RSC instruction.
...
Add two-operand instruction aliases. Add parsing and encoding tests for
variants of the instruction.
llvm-svn: 135713
2011-07-21 22:56:30 +00:00
Jim Grosbach
17806e6636
ARM assembly parsing support for RSB instruction.
...
Add two-operand instruction aliases. Add parsing and encoding tests for
variants of the instruction.
llvm-svn: 135712
2011-07-21 22:37:43 +00:00
Jim Grosbach
2a22c06267
ARM parsing and encoding tests for RBIT, REV, REV16 and REVSH.
...
llvm-svn: 135710
2011-07-21 22:29:23 +00:00
Jim Grosbach
b31e60b7c6
ARM parsing and encodings tests for saturating arithmetic insns.
...
llvm-svn: 135709
2011-07-21 22:18:28 +00:00
Jim Grosbach
4aaae18d73
Tidy up.
...
llvm-svn: 135706
2011-07-21 21:26:05 +00:00
Nicolas Geoffray
6820c1e0d3
Update generated CPP code with the new API on CallInst::Create and ConstantExpr::getGetElementPtr.
...
llvm-svn: 135704
2011-07-21 20:59:21 +00:00
Jim Grosbach
0a8d89242f
ARM assembly parsing POP/PUSH mnemonics.
...
Aliases for LDM/STM. The single-register versions should encode to LDR/STR
with writeback, but we don't (yet) get that correct. Neither does Darwin's
system assembler, though, so that's not a deal-breaker of a limitation.
llvm-svn: 135702
2011-07-21 19:57:11 +00:00
Oscar Fuentes
378f59d4cd
Fix CMake build
...
llvm-svn: 135698
2011-07-21 19:10:57 +00:00
Jim Grosbach
b2aa2c4a24
Add tests for ARM PKH assembly parsing.
...
llvm-svn: 135696
2011-07-21 19:02:03 +00:00
Owen Anderson
b595ed0085
Split up the ARM so_reg ComplexPattern into so_reg_reg and so_reg_imm, allowing us to distinguish the encodings that use shifted registers from those that use shifted immediates. This is necessary to allow the fixed-length decoder to distinguish things like BICS vs LDRH.
...
llvm-svn: 135693
2011-07-21 18:54:16 +00:00
Andrew Trick
cd3e8cb882
Cleanup: make std::pair usage slightly less indecipherable without actually naming variables!
...
llvm-svn: 135684
2011-07-21 17:37:39 +00:00
Benjamin Kramer
5fb7737513
Sink parts of TargetRegisterClass into MCRegisterClass.
...
llvm-svn: 135683
2011-07-21 17:26:50 +00:00
Jim Grosbach
27c1e2560c
ARM assembly parsing and encoding for PKHBT and PKHTB instructions.
...
llvm-svn: 135682
2011-07-21 17:23:04 +00:00
Bruno Cardoso Lopes
d1d9c78650
Added the infrastructute necessary for MIPS JIT support. Patch by Vladimir
...
Stefanovic. I removed the part that actually emits the instructions cause
I want that to get in better shape first and in incremental steps. This
also makes it easier to review the upcoming parts.
llvm-svn: 135678
2011-07-21 16:28:51 +00:00
Jay Foad
2f5fc8c67d
Make better use of ConstantExpr::getGetElementPtr's InBounds parameter.
...
llvm-svn: 135676
2011-07-21 15:15:37 +00:00
Jay Foad
857a48a8d7
Sort case-insensitively.
...
llvm-svn: 135674
2011-07-21 14:42:51 +00:00
Jay Foad
ed8db7d9df
Convert ConstantExpr::getGetElementPtr and
...
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef.
llvm-svn: 135673
2011-07-21 14:31:17 +00:00
Jay Foad
95f1ebd41b
Update llvm-gcc-4.2 and dragonegg after converting ConstantFolder APIs
...
to use ArrayRef.
llvm-svn: 135672
2011-07-21 09:19:11 +00:00
Jay Foad
32351fa820
Convert ConstantFolder APIs to use ArrayRef.
...
llvm-svn: 135671
2011-07-21 07:52:17 +00:00
Chris Lattner
5cf753c95e
move tier out of an anonymous namespace, it doesn't make sense
...
to for it to be an an anon namespace and be in a header.
Eliminate some extraenous uses of tie.
llvm-svn: 135669
2011-07-21 06:21:31 +00:00
Bruno Cardoso Lopes
178fb40612
- Register v16i16 as valid VR256 register class
...
- Add more bitcasts for v16i16
- Since 135661 and 135662 already added the splat logic,
just add one more splat test for v16i16
llvm-svn: 135663
2011-07-21 02:24:08 +00:00
Bruno Cardoso Lopes
b878caa5e2
Add support for 256-bit versions of VPERMIL instruction. This is a new
...
instruction introduced in AVX, which can operate on 128 and 256-bit vectors.
It considers a 256-bit vector as two independent 128-bit lanes. It can permute
any 32 or 64 elements inside a lane, and restricts the second lane to
have the same permutation of the first one. With the improved splat support
introduced early today, adding codegen for this instruction enable more
efficient 256-bit code:
Instead of:
vextractf128 $0, %ymm0, %xmm0
punpcklbw %xmm0, %xmm0
punpckhbw %xmm0, %xmm0
vinsertf128 $0, %xmm0, %ymm0, %ymm1
vinsertf128 $1, %xmm0, %ymm1, %ymm0
vextractf128 $1, %ymm0, %xmm1
shufps $1, %xmm1, %xmm1
movss %xmm1, 28(%rsp)
movss %xmm1, 24(%rsp)
movss %xmm1, 20(%rsp)
movss %xmm1, 16(%rsp)
vextractf128 $0, %ymm0, %xmm0
shufps $1, %xmm0, %xmm0
movss %xmm0, 12(%rsp)
movss %xmm0, 8(%rsp)
movss %xmm0, 4(%rsp)
movss %xmm0, (%rsp)
vmovaps (%rsp), %ymm0
We get:
vextractf128 $0, %ymm0, %xmm0
punpcklbw %xmm0, %xmm0
punpckhbw %xmm0, %xmm0
vinsertf128 $0, %xmm0, %ymm0, %ymm1
vinsertf128 $1, %xmm0, %ymm1, %ymm0
vpermilps $85, %ymm0, %ymm0
llvm-svn: 135662
2011-07-21 01:55:47 +00:00
Bruno Cardoso Lopes
fb4920eb25
Improve splat promotion to handle AVX types: v32i8 and v16i16. Also
...
refactor the code and add a bunch of comments. The final shuffle
emitted by handling 256-bit types is suitable for the VPERM shuffle
instruction which is going to be introduced in a next commit (with
a testcase which cover this commit)
llvm-svn: 135661
2011-07-21 01:55:42 +00:00
Bruno Cardoso Lopes
18a8d25b62
Add aditional patterns for vextractf128 instruction
...
llvm-svn: 135660
2011-07-21 01:55:39 +00:00
Bruno Cardoso Lopes
2389881b69
Add aditional patterns for vinsertf128 instruction
...
llvm-svn: 135659
2011-07-21 01:55:36 +00:00
Bruno Cardoso Lopes
0a57b22588
Add v16i16 type to VR256 class
...
llvm-svn: 135658
2011-07-21 01:55:33 +00:00
Bruno Cardoso Lopes
e6f8832631
Move code around. No functionality changes
...
llvm-svn: 135657
2011-07-21 01:55:30 +00:00
Bruno Cardoso Lopes
0bdeacf03b
Tidy up code
...
llvm-svn: 135656
2011-07-21 01:55:27 +00:00
Andrew Trick
bd243d0dfe
LSR, correct fix for rdar://9786536. Silly casting bug.
...
llvm-svn: 135654
2011-07-21 01:45:54 +00:00
Andrew Trick
858e9f083d
LSR must sometimes sign-extend before generating double constants.
...
rdar://9786536
llvm-svn: 135650
2011-07-21 01:05:01 +00:00
Bill Wendling
28b6e12d9d
Mark instructions which are part of the frame setup with the MachineInstr::FrameSetup flag.
...
llvm-svn: 135645
2011-07-21 00:44:56 +00:00
Andrew Trick
8acb434402
LSR crashes on an empty IVUsers list.
...
rdar://9786536
llvm-svn: 135644
2011-07-21 00:40:04 +00:00
Evan Cheng
c3035d6657
X86 is the only target that uses coff format. This should fixes test failures running on Windows, Cygwin, or MingW hosts.
...
llvm-svn: 135639
2011-07-20 23:53:54 +00:00
NAKAMURA Takumi
72c4af5d66
docs/GettingStarted.html: Tweak style.
...
llvm-svn: 135637
2011-07-20 23:37:51 +00:00
Evan Cheng
a20cde31e7
Sink ARMMCExpr and ARMAddressingModes into MC layer. First step to separate ARM MC code from target.
...
llvm-svn: 135636
2011-07-20 23:34:39 +00:00
Bill Wendling
ed93564c7a
Remove unused function.
...
llvm-svn: 135635
2011-07-20 23:07:42 +00:00
Bill Wendling
01bd7d9dc0
Remove the now defunct getCompactUnwindEncoding method from the frame lowering code.
...
llvm-svn: 135634
2011-07-20 23:04:09 +00:00
Devang Patel
ddfe66e948
Refactor.
...
llvm-svn: 135633
2011-07-20 23:00:27 +00:00
NAKAMURA Takumi
5d2a7328ed
docs/GettingStarted.html: Fix a typo and tweak a command line.
...
llvm-svn: 135632
2011-07-20 22:58:28 +00:00
Devang Patel
8fb9fd6769
There are two ways to map a variable to its lexical scope. Lexical scope information is embedded in MDNode describing the variable. It is also available as a part of DebugLoc attached with DBG_VALUE instruction. DebugLoc attached with an instruction is less reliable in optimized code so use information embedded in the MDNode.
...
llvm-svn: 135629
2011-07-20 22:18:50 +00:00
Eli Friedman
911e12f505
Clean up includes of llvm/Analysis/ConstantFolding.h so it's included where it's used and not included where it isn't.
...
llvm-svn: 135628
2011-07-20 21:57:23 +00:00
Devang Patel
bcd50a10d5
While emitting constant value, look through derived type and use underlying basic type to determine size and signness of the constant value.
...
llvm-svn: 135627
2011-07-20 21:57:04 +00:00
Jim Grosbach
a288b1c10a
ARM PKH shift ammount operand printing tweaks.
...
Move the shift operator and special value (32 encoded as 0 for PKHTB) handling
into the instruction printer. This cleans up a bit of the disassembler
special casing for these instructions, more easily handles not printing the
operand at all for "lsl #0" and prepares for correct asm parsing of these
operands.
llvm-svn: 135626
2011-07-20 21:40:26 +00:00
Eli Friedman
0cdc148ab8
Bring LICM into compliance with the new "Memory Model for Concurrent Operations" in LangRef.
...
llvm-svn: 135625
2011-07-20 21:37:47 +00:00
Eli Friedman
35b54aa148
Commit LangRef changes for LLVM concurrency model. Start of supporting C++0x memory model and atomics. See thread on llvmdev titled "Reviving the new LLVM concurrency model".
...
llvm-svn: 135624
2011-07-20 21:35:53 +00:00
Francois Pichet
7f023ae4bb
Unbreak the MSVC build. Since the "next" function already exists in the MSVC headers, we need the explicit llvm:: qualifier to prevent a conflict.
...
llvm-svn: 135623
2011-07-20 21:35:29 +00:00
Jim Grosbach
94df3be987
Tidy up a bit.
...
Move common definitions for ARM and Thumb2 into ARMInstrFormats.td and rename
them to be a bit more descriptive that they're for the PKH instructions.
llvm-svn: 135617
2011-07-20 20:49:03 +00:00
Jim Grosbach
a98f80095b
ARM: Tidy up representation of PKH instruction.
...
The shift type is implied by the instruction (PKHBT vs. PKHTB) and so shouldn't
be also encoded as part of the shift value immediate. Otherwise we're able to
represent invalid instructions, plus it needlessly complicates the
representation. Preparatory work for asm parsing of these instructions.
llvm-svn: 135616
2011-07-20 20:32:09 +00:00
Benjamin Kramer
e6f7f914db
Fix cmake again :)
...
llvm-svn: 135613
2011-07-20 20:00:06 +00:00
Evan Cheng
bbf3b0de8b
Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.
...
There is still a bit more refactoring left to do in Targets. But we are now very
close to fixing all the layering issues in MC.
llvm-svn: 135611
2011-07-20 19:50:42 +00:00
Benjamin Kramer
82f64488ec
Fix cmake.
...
llvm-svn: 135609
2011-07-20 19:43:38 +00:00
Benjamin Kramer
87ee76ca73
Sketch out an CFG reconstruction mode for llvm-objdump.
...
- Not great yet, but it's a start.
- Requires an object file with a symbol table. (I really want to fix this, but it'll need a whole new algorithm)
- ELF and COFF won't work at the moment due to libObject shortcomings.
To try it out run
$ llvm-objdump -d --cfg foo.o
This will create a graphviz file for every symbol in the object file's text section containing a CFG.
llvm-svn: 135608
2011-07-20 19:37:35 +00:00
Eli Friedman
ae60b6b008
Extend the hack for _GLOBAL_OFFSET_TABLE_ slightly; PR10389.
...
llvm-svn: 135607
2011-07-20 19:36:11 +00:00
Jim Grosbach
2ea9f25f5f
Add parsing/encoding tests for ARM ORR instruction.
...
llvm-svn: 135602
2011-07-20 18:48:53 +00:00
Jim Grosbach
a3fcb962eb
Consolidate ARM NOP encoding test.
...
llvm-svn: 135600
2011-07-20 18:39:38 +00:00
Jim Grosbach
614e90a126
ARM parsing and encoding tests for MVN
...
llvm-svn: 135599
2011-07-20 18:37:08 +00:00
Jim Grosbach
8d11490771
ARM assembly parsing of MUL instruction.
...
Correctly handle 's' bit and predication suffices. Add parsing and encoding
tests.
llvm-svn: 135596
2011-07-20 18:20:31 +00:00
Eli Friedman
6ed783228d
PR10421: Fix a straightforward bug in the widening logic for CONCAT_VECTORS.
...
llvm-svn: 135595
2011-07-20 18:14:33 +00:00
Benjamin Kramer
acb9ed4077
Initialize the EHFrameSection pointer to zero.
...
This should fix the spurious buildbot errors.
llvm-svn: 135594
2011-07-20 18:13:23 +00:00
Eric Christopher
65080cc55c
Regenerate configure and friends for Chad.
...
llvm-svn: 135592
2011-07-20 17:04:49 +00:00
Jay Foad
50bfbab033
Fix a GCC warning.
...
llvm-svn: 135581
2011-07-20 08:15:21 +00:00
Evan Cheng
efd9b4240f
- Move CodeModel from a TargetMachine global option to MCCodeGenInfo.
...
- Introduce JITDefault code model. This tells targets to set different default
code model for JIT. This eliminates the ugly hack in TargetMachine where
code model is changed after construction.
llvm-svn: 135580
2011-07-20 07:51:56 +00:00
Evan Cheng
345b6b45c1
Include MCRegisterInfo to eliminate a compilation warning.
...
llvm-svn: 135575
2011-07-20 06:54:19 +00:00
Francois Pichet
e3063f022b
Fix the CMake build.
...
llvm-svn: 135573
2011-07-20 06:35:24 +00:00
Evan Cheng
76792992d6
Add MCObjectFileInfo and sink the MCSections initialization code from
...
TargetLoweringObjectFileImpl down to MCObjectFileInfo.
TargetAsmInfo is done to one last method. It's *almost* gone!
llvm-svn: 135569
2011-07-20 05:58:47 +00:00
Andrew Trick
638b355a16
indvars: Added getInsertPointForUses to find a valid place to truncate the IV.
...
llvm-svn: 135568
2011-07-20 05:32:06 +00:00
Andrew Trick
2210448520
indvars -disable-iv-rewrite: Add NarrowIVDefUse to cache def-use
...
info. Holding Use* pointers is bad form even though it happened to
work in this case.
llvm-svn: 135566
2011-07-20 04:39:24 +00:00
NAKAMURA Takumi
b66d255595
X86Subtarget.h: Assume "x86_64-cygwin", though it has not been released yet, to appease test/CodeGen/X86 on cygwin.
...
llvm-svn: 135564
2011-07-20 04:02:20 +00:00
Eric Christopher
60648578ba
New pointer rotate test.
...
llvm-svn: 135562
2011-07-20 03:09:11 +00:00
Eric Christopher
954bdafb50
Extra semi-colon.
...
llvm-svn: 135561
2011-07-20 02:44:39 +00:00
Andrew Trick
f53622e129
indvars test case for r135558.
...
llvm-svn: 135559
2011-07-20 02:14:37 +00:00
Andrew Trick
c5dd3e976a
indvars -disable-iv-rewrite fix: derived GEP IVs
...
llvm-svn: 135558
2011-07-20 02:08:58 +00:00
Benjamin Kramer
cc38ef6d84
Don't leak CodeGenInfos.
...
llvm-svn: 135555
2011-07-20 01:27:58 +00:00
Akira Hatanaka
170581488f
Change name of class.
...
llvm-svn: 135550
2011-07-20 00:53:09 +00:00
Akira Hatanaka
969edcdf74
Define classes for definitions of atomic instructions.
...
llvm-svn: 135546
2011-07-20 00:23:01 +00:00
Bill Wendling
d942384128
Build and install the archive when building the Apple way.
...
llvm-svn: 135538
2011-07-19 23:33:42 +00:00
Akira Hatanaka
a4c09bce9b
Lower memory barriers to sync instructions.
...
llvm-svn: 135537
2011-07-19 23:30:50 +00:00
Evan Cheng
ccf243d56b
Fix an obvious typo that's preventing x86 (32-bit) from using .literal16.
...
llvm-svn: 135535
2011-07-19 23:14:32 +00:00
Eli Friedman
55d6ccbb79
PR10386: Don't try to split an edge from an indirectbr.
...
llvm-svn: 135534
2011-07-19 22:59:41 +00:00
Benjamin Kramer
46d9cd5f72
Fix off-by-one.
...
llvm-svn: 135533
2011-07-19 22:59:25 +00:00
Jim Grosbach
d25c2cdad7
Tweak ARM assembly parsing and printing of MSR instruction.
...
The system register spec should be case insensitive. The preferred form for
output with mask values of 4, 8, and 12 references APSR rather than CPSR.
Update and tidy up tests accordingly.
llvm-svn: 135532
2011-07-19 22:45:10 +00:00
Devang Patel
a59b24b090
Distinguish between two copies of one inlined variable.
...
llvm-svn: 135528
2011-07-19 22:31:15 +00:00
Jim Grosbach
97094d8f06
ARM assembly parsing of MRS instruction.
...
Teach the parser to recognize the APSR and SPSR system register names. Add
and update tests accordingly.
llvm-svn: 135527
2011-07-19 21:59:29 +00:00
Owen Anderson
c78e03c39a
Enhance the FixedLengthDecoder to be able to generate plausible-looking decoders for ARM.
...
llvm-svn: 135524
2011-07-19 21:06:00 +00:00
Akira Hatanaka
9663dd3f00
Change variable name.
...
llvm-svn: 135522
2011-07-19 20:56:53 +00:00
Jim Grosbach
7d1e5f11ea
ARM assembly parsing for MRC/MRC2/MRRC/MRRC2.
...
Add range checking to the immediate operands. Update tests accordingly.
llvm-svn: 135521
2011-07-19 20:35:35 +00:00
Akira Hatanaka
f3b29992d5
Use the correct opcodes: SLLV/SRLV or AND must be used instead of SLL/SRL or
...
ANDi, when the instruction does not have any immediate operands.
llvm-svn: 135520
2011-07-19 20:34:00 +00:00
Jim Grosbach
b17d9b12a6
Move mr[r]c[2] ARM tests and tidy up a bit.
...
llvm-svn: 135517
2011-07-19 20:28:56 +00:00
Jim Grosbach
69721dce67
ARM testcases for MOVT.
...
llvm-svn: 135516
2011-07-19 20:23:25 +00:00
Akira Hatanaka
0e01959327
Use descriptive variable names.
...
llvm-svn: 135514
2011-07-19 20:11:17 +00:00
Jim Grosbach
5cc3b4cd9a
ARM assembly parsing for MOV (register).
...
Correct the handling of the 's' suffix when parsing ARM mode. It's only a
truly separate opcode in Thumb. Add test cases to make sure we handle
the s and condition suffices correctly, including diagnostics.
llvm-svn: 135513
2011-07-19 20:10:31 +00:00
Jim Grosbach
81ebc733b4
Tidy up.
...
llvm-svn: 135507
2011-07-19 19:47:11 +00:00
Jim Grosbach
22ac078657
Tighten conditional for 'mov' cc_out.
...
Make sure we only clobber the cc_out operand if it is indeed a default
non-setting operand.
llvm-svn: 135506
2011-07-19 19:45:44 +00:00
Devang Patel
cfa82a378d
Reapply r135457. This needs llvm-gcc change, that I forgot to check-in yesterday.
...
llvm-svn: 135504
2011-07-19 19:41:54 +00:00
Jim Grosbach
7c09e3c3f3
ARM assembly parsing for MOV (immediate).
...
Add range checking for the immediate operand and handle the "mov" mnemonic
choosing between encodings based on the value of the immediate. Add tests
for fixups, encoding choice and values, and diagnostic for out of range values.
llvm-svn: 135500
2011-07-19 19:13:28 +00:00
Jim Grosbach
20dd6e9fae
Whitespace.
...
llvm-svn: 135499
2011-07-19 19:02:39 +00:00
Jim Grosbach
b475205afd
Remove unused code.
...
cc_out and pred operands are added during parsing via custom C++ now.
llvm-svn: 135497
2011-07-19 18:32:48 +00:00
Akira Hatanaka
db2ccdcfd2
Fix comments.
...
llvm-svn: 135496
2011-07-19 18:19:40 +00:00
Akira Hatanaka
e450358a21
Remove redundant instructions.
...
- In EmitAtomicBinaryPartword, mask incr in loopMBB only if atomic.swap is the
instruction being expanded, instead of masking it in thisMBB.
- Remove redundant Or in EmitAtomicCmpSwap.
llvm-svn: 135495
2011-07-19 18:14:26 +00:00
Akira Hatanaka
08636b4633
Separate code that modifies control flow from code that adds instruction to
...
basic blocks.
llvm-svn: 135490
2011-07-19 17:09:53 +00:00
Jim Grosbach
9720dcf70b
ARM range checking for so_imm operands in assembly parsing.
...
llvm-svn: 135489
2011-07-19 16:50:30 +00:00
Bob Wilson
da30cf84c3
Revert "Make a provision to encode inline location in a variable. This will enable dwarf writer to easily distinguish between two instances of a inlined variable in one basic block."
...
This reverts commit 9fec5e346efdf744b151ae6604f912908315fa7a.
llvm-svn: 135486
2011-07-19 16:32:50 +00:00
Bob Wilson
088df09f27
Revert "Update docs to reflect r135457."
...
This reverts commit ba034c0a2e71303c7cf3f43ca8e69dc8436b32e2.
llvm-svn: 135485
2011-07-19 16:31:58 +00:00
Jay Foad
ca3fc38839
Convert ConstantFoldGetElementPtr to use ArrayRef.
...
llvm-svn: 135483
2011-07-19 15:30:30 +00:00
Jay Foad
b992a635fb
Convert SimplifyGEPInst to use ArrayRef.
...
llvm-svn: 135482
2011-07-19 15:07:52 +00:00
Jay Foad
528bedaf5d
Convert gep_type_begin and gep_type_end to use ArrayRef.
...
llvm-svn: 135481
2011-07-19 14:42:50 +00:00
Jay Foad
bf904773bb
Convert TargetData::getIndexedOffset to use ArrayRef.
...
llvm-svn: 135478
2011-07-19 14:01:37 +00:00
Jay Foad
f4b14a2b0d
Use ArrayRef in ConstantFoldInstOperands and ConstantFoldCall.
...
llvm-svn: 135477
2011-07-19 13:32:40 +00:00
Richard Osborne
f1b800998a
Add intrinsics for the zext / sext instructions.
...
llvm-svn: 135476
2011-07-19 13:28:50 +00:00
Richard Osborne
252c43ee88
Add intrinsics for the testct, testwct instructions.
...
llvm-svn: 135475
2011-07-19 13:00:40 +00:00
Richard Osborne
707f0beae1
Add intrinsics for the peek and endin instructions.
...
llvm-svn: 135474
2011-07-19 12:50:25 +00:00
Nick Lewycky
56e99c7933
Remove bogus test: for all possible inputs of %X, the 'sub nsw' is guaranteed
...
to perform a signed wrap. Don't rely on any particular handling of that case.
llvm-svn: 135471
2011-07-19 08:22:57 +00:00
Evan Cheng
2129f59637
Introduce MCCodeGenInfo, which keeps information that can affect codegen
...
(including compilation, assembly). Move relocation model Reloc::Model from
TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine.
llvm-svn: 135468
2011-07-19 06:37:02 +00:00
Akira Hatanaka
e4e9a590d2
Make EmitAtomic functions return the correct MachineBasicBlocks so that
...
ExpandISelPseudos::runOnMachineFunction does not visit instructions that have
just been added.
llvm-svn: 135465
2011-07-19 03:42:13 +00:00
Akira Hatanaka
e97bd81f07
Do not insert instructions in reverse order.
...
llvm-svn: 135464
2011-07-19 03:14:58 +00:00
Eli Friedman
8608e6e913
Make isLoadExtLegal and isTruncStoreLegal check what the name says. :) This might have some minor effect on CellSPU, but all other targets should be unaffected. Fixing per report from Damien Vincent on llvmdev.
...
llvm-svn: 135462
2011-07-19 02:24:07 +00:00
Devang Patel
7ca23dde4e
Update docs to reflect r135457.
...
llvm-svn: 135458
2011-07-19 01:04:39 +00:00
Devang Patel
ac532dedf1
Make a provision to encode inline location in a variable. This will enable dwarf writer to easily distinguish between two instances of a inlined variable in one basic block.
...
llvm-svn: 135457
2011-07-19 01:03:32 +00:00
Devang Patel
9ab3cac694
Revert r135423.
...
llvm-svn: 135454
2011-07-19 00:28:24 +00:00
Jeffrey Yasskin
532114e8a4
Document how to maintain a git-svn clone of the LLVM git repositories.
...
llvm-svn: 135453
2011-07-19 00:20:54 +00:00
Bill Wendling
ada366c691
Micro-opt: Only emit compact unwind if there is a compact unwind encoding to emit.
...
llvm-svn: 135452
2011-07-19 00:09:25 +00:00
Bill Wendling
49bc680bdf
Use the CompactUnwindEncoding from the Frame, if it's defined.
...
llvm-svn: 135451
2011-07-19 00:06:12 +00:00
Bill Wendling
b20453faae
Add a frame with the compact unwind encoding if it exists.
...
llvm-svn: 135450
2011-07-19 00:02:51 +00:00
Bill Wendling
c438d78c38
Add a method to set compact unwind encoding information in a frame.
...
llvm-svn: 135449
2011-07-19 00:01:42 +00:00
Bill Wendling
6969ed6286
Rename CompactEncoding to CompactUnwindEncoding.
...
llvm-svn: 135448
2011-07-19 00:00:58 +00:00
Sean Callanan
67bc18552a
Fixed a bug where the MC subtarget information
...
wasn't being initialized by the enhanced disassembler,
leading to assertion failures.
llvm-svn: 135447
2011-07-19 00:00:41 +00:00
Bill Wendling
c1e40ddde2
Add a field for the compact unwind encoding.
...
llvm-svn: 135446
2011-07-19 00:00:05 +00:00
Bill Wendling
353404d924
Move the compact encoding from the target-specific library to the code-gen
...
library.
llvm-svn: 135443
2011-07-18 23:38:40 +00:00
Owen Anderson
83c6c4f30e
Revamp our handling of tLDMIA[_UPD] and tSTMIA[_UPD] to avoid having multiple instructions with the same encoding. This resolves another conflict when bringing up the new-style disassembler.
...
llvm-svn: 135442
2011-07-18 23:25:34 +00:00
Evan Cheng
4ce2e4f289
Eliminate TargetAsmInfo::getCompactUnwindEncoding. This get rid of the
...
use of TargetFrameLowering in TargetAsmInfo.
llvm-svn: 135439
2011-07-18 22:32:12 +00:00
Evan Cheng
67c033e6b8
Move getInitialFrameState from TargetFrameInfo to MCAsmInfo (suggestions for
...
better location welcome).
llvm-svn: 135438
2011-07-18 22:29:13 +00:00
Owen Anderson
eab4625763
Mark the Darwin assembler workout as isCodeGenOnly, so that it doesn't cause decoding conflicts in the new-style disassembler.
...
llvm-svn: 135434
2011-07-18 22:14:02 +00:00
Jeffrey Yasskin
7a16288157
Add APInt(numBits, ArrayRef<uint64_t> bigVal) constructor to prevent future ambiguity
...
errors like the one corrected by r135261. Migrate all LLVM callers of the old
constructor to the new one.
llvm-svn: 135431
2011-07-18 21:45:40 +00:00
Eli Friedman
4d5532a085
FileCheck-ize a couple tests.
...
llvm-svn: 135427
2011-07-18 21:23:42 +00:00
Andrew Trick
c43b67644c
Compiler warning.
...
llvm-svn: 135426
2011-07-18 21:15:03 +00:00
Evan Cheng
d60fa58ba1
Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo down
...
to MCRegisterInfo. Also initialize the mapping at construction time.
This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step
towards fixing the layering violation.
llvm-svn: 135424
2011-07-18 20:57:22 +00:00
Devang Patel
4dc76f2438
During bottom up fast-isel, instructions emitted to materalize registers are at top of basic block and do not have debug location. This may misguide debugger while entering the basic block and sometimes debugger provides semi useful view of current location to developer by picking up previous known location as current location. Assign a sensible location to the first instruction in a basic block, if it does not have one location derived from source file, so that debugger can provide meaningful user experience to developers in edge cases.
...
[take 2]
llvm-svn: 135423
2011-07-18 20:55:23 +00:00
Andrew Trick
7da2417c8a
indvars: LinearFunctionTestReplace for non-canonical IVs.
...
For -disable-iv-rewrite, perform LFTR without generating a new
"canonical" induction variable. Instead find the "best" existing
induction variable for use in the loop exit test and compute the final
value of that IV for use in the new loop exit test. In short,
convert to a simple eq/ne exit test as long as it's cheap to do so.
llvm-svn: 135420
2011-07-18 20:32:31 +00:00
Akira Hatanaka
338879a7f4
Do not treat atomic.load.sub differently than other atomic binary intrinsics.
...
llvm-svn: 135418
2011-07-18 19:58:59 +00:00
Akira Hatanaka
27292638bd
Set mayLoad or mayStore flags for SC and LL in order to prevent LICM from
...
moving them out of the loop. Previously, stores and loads to a stack frame
object were inserted to accomplish this. Remove the code that was needed to do
this. Patch by Sasa Stankovic.
llvm-svn: 135415
2011-07-18 18:52:12 +00:00
Owen Anderson
64d53620aa
Re-apply r135319 with a fix for the constant island pass.
...
Original Log: Get rid of the separate opcodes for the Darwin versions of tBL, tBLXi, and tBLXr, using pseudo-instructions to lower to the single final opcode. Update the ARM disassembler for this change.
llvm-svn: 135414
2011-07-18 18:50:52 +00:00
Jakob Stoklund Olesen
c45d38e14a
Fix a crash when building 177.mesa for armv6.
...
When splitting a live range immediately before an LDR_POST instruction
that redefines the address register, make sure to use the correct value
number in leaveIntvBefore.
We need the value number entering the instruction.
<rdar://problem/9793765>
llvm-svn: 135413
2011-07-18 18:47:13 +00:00
Andrew Trick
494c549ebd
indvars: Added verification that LFTR and other indvars goodness does
...
not interfere with BackedgeTakenCount computation.
llvm-svn: 135412
2011-07-18 18:44:20 +00:00
Andrew Trick
a27d8b183a
indvars: Added isHighCostExpansion. Avoid generating extra ops in the
...
preheader for the sole purpose of LFTR, since LFTR itself is usually not
a clear optimization.
llvm-svn: 135409
2011-07-18 18:21:35 +00:00
Bruno Cardoso Lopes
50c1d9816c
Be more smart with VCVTSS2SD. Also place the patterns close to the
...
definitions.
llvm-svn: 135407
2011-07-18 18:11:25 +00:00
Bruno Cardoso Lopes
4208cace5f
Add AVX 128-bit sqrt versions
...
llvm-svn: 135404
2011-07-18 17:51:40 +00:00
Akira Hatanaka
8b98515c29
Change destination register operands of SC instructions so that unique
...
virtual registers are used.
llvm-svn: 135403
2011-07-18 17:44:27 +00:00
Jakob Stoklund Olesen
abcfdcea5c
Intern all RecTy subclass instances to avoid duplicates.
...
Make all of the RecTy constructors private, and use get() factory
methods instead. Return singleton instances when it makes sense.
ListTy instance pointers are stored in the element RecTy instance.
BitsRecTy instance pointers, one per length, are stored in a static vector.
Also unique DefInit instances. A Record has a unique DefInit which
has a unique RecordRecTy instance.
This saves some 200k-300k RecTy allocations when parsing ARM.td. It
reduces TableGen's heap usage by almost 50%.
llvm-svn: 135399
2011-07-18 17:02:57 +00:00
Chris Lattner
71fbd6b228
various cleanups noticed by Frits
...
llvm-svn: 135396
2011-07-18 16:35:57 +00:00
Chris Lattner
e5f440204b
remove pasto
...
llvm-svn: 135394
2011-07-18 16:04:11 +00:00
Frits van Bommel
1b3ee75077
Hopefully fix some GCC-based buildbots. GCC apparently decays the array to a pointer here before overload resolution, so construct with an explicit length instead.
...
llvm-svn: 135391
2011-07-18 12:31:03 +00:00
Frits van Bommel
717d7edd3e
Migrate LLVM and Clang to use the new makeArrayRef(...) functions where previously explicit non-default constructors were used.
...
Mostly mechanical with some manual reformatting.
llvm-svn: 135390
2011-07-18 12:00:32 +00:00
Frits van Bommel
23db45e99c
Introduce the 'makeArrayRef(...)' family of functions, which fills a similar role for ArrayRef<> as std::make_pair() fills for std::pair<>: they return the right instantiation of ArrayRef<T> based on the types of the parameters.
...
They mostly mirror the ArrayRef constructors, with two exceptions:
* There's no function mirroring the default constructor because it wouldn't have any parameters to deduce the right ArrayRef<T> from.
* There's an explicit SmallVector<T> overload in addition to the SmallVectorImpl<T> overload. Without it, the single-element overload would try to create an ArrayRef<Smallvector<T> > because it's a better match according to the overloading rules. (And both overloads are used in the current tree, so neither is redundant)
llvm-svn: 135389
2011-07-18 11:58:53 +00:00
Nick Lewycky
d8921f939c
Delete empty unused file.
...
llvm-svn: 135379
2011-07-18 05:54:06 +00:00
Jakob Stoklund Olesen
c0dd3da9c5
Fix PR10387.
...
When trying to rematerialize a value before an instruction that has an
early-clobber redefine of the virtual register, make sure to look up the
correct value number.
Early-clobber defs are moved one slot back, so getBaseIndex is needed to
find the used value number.
Bugpoint was unable to reduce the test case for this, see PR10388.
llvm-svn: 135378
2011-07-18 05:31:59 +00:00
Chris Lattner
14b3b4df6f
document this api change.
...
llvm-svn: 135376
2011-07-18 04:56:02 +00:00
Chris Lattner
229907cd11
land David Blaikie's patch to de-constify Type, with a few tweaks.
...
llvm-svn: 135375
2011-07-18 04:54:35 +00:00
Chris Lattner
805d09459d
update for recent api changes. I have a hard time believing that this is actually a useful example.
...
llvm-svn: 135374
2011-07-18 04:52:58 +00:00
Chris Lattner
6b8eb8cd71
update this to build with a recent IRBuilder change and de-constify types.
...
llvm-svn: 135373
2011-07-18 04:52:09 +00:00
Evan Cheng
2cf16c90f9
LLC doesn't need to create MCInstrInfo's.
...
llvm-svn: 135369
2011-07-18 04:16:27 +00:00
Chris Lattner
8e8d674d79
add iteration support to TinyPtrVector for clang's use.
...
llvm-svn: 135367
2011-07-18 01:53:11 +00:00
Chris Lattner
7b70bef7c8
fix a warning in TinyPtrVector, adopt it in SSAUpdater, saving some
...
mallocs.
llvm-svn: 135366
2011-07-18 01:43:58 +00:00
Chris Lattner
a8680dced2
introduce a new TinyPtrVector class.
...
llvm-svn: 135365
2011-07-18 01:40:02 +00:00
Benjamin Kramer
2b8cb92209
Simplify & microoptimize code. No intended functionality change.
...
llvm-svn: 135364
2011-07-18 00:00:20 +00:00
Nadav Rotem
76d51c6c89
Minor code cleanups
...
llvm-svn: 135362
2011-07-17 19:05:00 +00:00
Oscar Fuentes
2d48f6537d
Fix CMake build on Solaris
...
When building LLVM/Clang on Solaris. The generated makefiles would
have an extraneous semi-colon character in them prior to this change
due to the way the 'CMAKE_CXX_FLAGS' variable was defined. Simply
adjusting the definition by moving the current CMAKE_CXX_FLAGS value
within the quotes solves the problem.
Patch by Art Haas!
llvm-svn: 135361
2011-07-17 17:35:15 +00:00
Chris Lattner
d04e32d308
tidy up
...
llvm-svn: 135360
2011-07-17 06:01:30 +00:00
Benjamin Kramer
a7606b993c
Silence compiler warnings.
...
llvm-svn: 135358
2011-07-16 22:26:27 +00:00
Jakub Staszak
6063549470
Remove unused LoopRanges from RegAllocGreedy.
...
llvm-svn: 135354
2011-07-16 20:43:00 +00:00
Jakub Staszak
623e1971ce
Remove "LoopInfo.h" include from BranchProbabilityInfo.h.
...
llvm-svn: 135353
2011-07-16 20:31:15 +00:00
Jakub Staszak
2713117135
Add MachineBlockFrequency analysis.
...
llvm-svn: 135352
2011-07-16 20:23:20 +00:00
Owen Anderson
2ebff84b90
Revert r135319 in an attempt to get to unbreak testers.
...
llvm-svn: 135343
2011-07-16 09:17:43 +00:00
Eric Christopher
c56b9c75d5
More minor adjustments.
...
llvm-svn: 135342
2011-07-16 07:28:35 +00:00
Matt Beaumont-Gay
26909d8c61
Silence unused variable warning
...
llvm-svn: 135339
2011-07-16 04:18:47 +00:00
Eli Friedman
0318036c4d
Make the disassembler able to disassemble a bunch of instructions with names in the TableGen files containing "64" on x86-32. This includes a bunch of x87 instructions, like fld, and a bunch of SSSE3 instructions on MMX registers like pshufb. Part of PR8873.
...
llvm-svn: 135337
2011-07-16 02:41:28 +00:00
Andrew Trick
c591f3afc3
indvars: fix a pass-sensitivity issue that would hit the SCEVExpander
...
assertion I added in r135333. Check for the existence of a preheader
before expanding a recurrence.
llvm-svn: 135335
2011-07-16 01:18:53 +00:00
Andrew Trick
9ea55dc2d6
indvars: remove ExprToIVMap because it won't be needed by LFTR.
...
llvm-svn: 135334
2011-07-16 01:06:48 +00:00
Andrew Trick
244e2c3e82
Fix SCEVEXpander to handle arbitrary phi expansion. Includes two
...
related bug fixes and corresponding assertions for uninitialized data
and missing NULL check. Test cases will be included with the new LFTR.
llvm-svn: 135333
2011-07-16 00:59:39 +00:00
Bruno Cardoso Lopes
4480040191
Add AVX 128-bit patterns for sint_to_fp
...
llvm-svn: 135332
2011-07-16 00:50:20 +00:00