Chris Lattner
57662f3882
several entries got significantly better, though they still aren't done.
...
llvm-svn: 44382
2007-11-27 22:41:52 +00:00
Chris Lattner
f3f4ad9dd6
implement a trivial readme entry.
...
llvm-svn: 44380
2007-11-27 22:36:16 +00:00
Chris Lattner
f81d5886c6
Several changes:
...
1) Change the interface to TargetLowering::ExpandOperationResult to
take and return entire NODES that need a result expanded, not just
the value. This allows us to handle things like READCYCLECOUNTER,
which returns two values.
2) Implement (extremely limited) support in LegalizeDAG::ExpandOp for MERGE_VALUES.
3) Reimplement custom lowering in LegalizeDAGTypes in terms of the new
ExpandOperationResult. This makes the result simpler and fully
general.
4) Implement (fully general) expand support for MERGE_VALUES in LegalizeDAGTypes.
5) Implement ExpandOperationResult support for ARM f64->i64 bitconvert and ARM
i64 shifts, allowing them to work with LegalizeDAGTypes.
6) Implement ExpandOperationResult support for X86 READCYCLECOUNTER and FP_TO_SINT,
allowing them to work with LegalizeDAGTypes.
LegalizeDAGTypes now passes several more X86 codegen tests when enabled and when
type legalization in LegalizeDAG is ifdef'd out.
llvm-svn: 44300
2007-11-24 07:07:01 +00:00
Dale Johannesen
7a7085f6d3
Add parameter to getDwarfRegNum to permit targets
...
to use different mappings for EH and debug info;
no functional change yet.
Fix warning in X86CodeEmitter.
llvm-svn: 44056
2007-11-13 19:13:01 +00:00
Bill Wendling
77b13af9a6
Unifacalize the CALLSEQ{START,END} stuff.
...
llvm-svn: 44045
2007-11-13 09:19:02 +00:00
Bill Wendling
f359fed9f9
Unify CALLSEQ_{START,END}. They take 4 parameters: the chain, two stack
...
adjustment fields, and an optional flag. If there is a "dynamic_stackalloc" in
the code, make sure that it's bracketed by CALLSEQ_START and CALLSEQ_END. If
not, then there is the potential for the stack to be changed while the stack's
being used by another instruction (like a call).
This can only result in tears...
llvm-svn: 44037
2007-11-13 00:44:25 +00:00
Owen Anderson
933b5b7e62
Add a flag for indirect branch instructions.
...
Target maintainers: please check that the instructions for your target are correctly marked.
llvm-svn: 44012
2007-11-12 07:39:39 +00:00
Anton Korobeynikov
4edfea438a
Use TableGen to emit information for dwarf register numbers.
...
This makes DwarfRegNum to accept list of numbers instead.
Added three different "flavours", but only slightly tested on x86-32/linux.
Please check another subtargets if possible,
llvm-svn: 43997
2007-11-11 19:50:10 +00:00
Evan Cheng
797d56ff17
Much improved pic jumptable codegen:
...
Then:
call "L1$pb"
"L1$pb":
popl %eax
...
LBB1_1: # entry
imull $4, %ecx, %ecx
leal LJTI1_0-"L1$pb"(%eax), %edx
addl LJTI1_0-"L1$pb"(%ecx,%eax), %edx
jmpl *%edx
.align 2
.set L1_0_set_3,LBB1_3-LJTI1_0
.set L1_0_set_2,LBB1_2-LJTI1_0
.set L1_0_set_5,LBB1_5-LJTI1_0
.set L1_0_set_4,LBB1_4-LJTI1_0
LJTI1_0:
.long L1_0_set_3
.long L1_0_set_2
Now:
call "L1$pb"
"L1$pb":
popl %eax
...
LBB1_1: # entry
addl LJTI1_0-"L1$pb"(%eax,%ecx,4), %eax
jmpl *%eax
.align 2
.set L1_0_set_3,LBB1_3-"L1$pb"
.set L1_0_set_2,LBB1_2-"L1$pb"
.set L1_0_set_5,LBB1_5-"L1$pb"
.set L1_0_set_4,LBB1_4-"L1$pb"
LJTI1_0:
.long L1_0_set_3
.long L1_0_set_2
llvm-svn: 43924
2007-11-09 01:32:10 +00:00
Lauro Ramos Venancio
f6a67bf700
[ARM] Implement __builtin_thread_pointer.
...
llvm-svn: 43892
2007-11-08 17:20:05 +00:00
Rafael Espindola
fa0df55bdd
Move the LowerMEMCPY and LowerMEMCPYCall to a common place.
...
Thanks for the suggestions Bill :-)
llvm-svn: 43742
2007-11-05 23:12:20 +00:00
Lauro Ramos Venancio
1a30c18e88
[ARM] Fix code generation for:
...
static __thread struct {
int a;
int b;
} teste = {0, 0};
llvm-svn: 43722
2007-11-05 18:33:37 +00:00
Duncan Sands
283207a71c
Eliminate the remaining uses of getTypeSize. This
...
should only effect x86 when using long double. Now
12/16 bytes are output for long double globals (the
exact amount depends on the alignment). This brings
globals in line with the rest of LLVM: the space
reserved for an object is now always the ABI size.
One tricky point is that only 10 bytes should be
output for long double if it is a field in a packed
struct, which is the reason for the additional
argument to EmitGlobalConstant.
llvm-svn: 43688
2007-11-05 00:04:43 +00:00
Rafael Espindola
419b6d7ce4
Make ARM and X86 LowerMEMCPY identical by moving the isThumb check into getMaxInlineSizeThreshold
...
and by restructuring the X86 version.
New I just have to move this to a common place :-)
llvm-svn: 43554
2007-10-31 14:39:58 +00:00
Rafael Espindola
063f177300
Make ARM an X86 memcpy expansion more similar to each other.
...
Now both subtarget define getMaxInlineSizeThreshold and the expansion uses it.
This should not change generated code.
llvm-svn: 43552
2007-10-31 11:52:06 +00:00
Dale Johannesen
65e804a9c3
Support non-POSIX hosts by removing use of strncasecmp.
...
llvm-svn: 43364
2007-10-25 21:54:43 +00:00
Evan Cheng
1f2dd35898
Fix memcpy lowering when addresses are 4-byte aligned but size is not multiple of 4.
...
llvm-svn: 43234
2007-10-22 22:11:27 +00:00
Rafael Espindola
18a831d783
split LowerMEMCPY into LowerMEMCPYCall and LowerMEMCPYInline in the ARM backend.
...
llvm-svn: 43176
2007-10-19 14:35:17 +00:00
Chris Lattner
5d979d57ae
Add an easy microoptimization I noticed.
...
llvm-svn: 43164
2007-10-19 03:29:26 +00:00
Evan Cheng
463e2ab0ac
- Added getOpcodeAfterMemoryUnfold(). It doesn't unfold an instruction, but only returns the opcode of the instruction post unfolding.
...
- Fix some copy+paste bugs.
llvm-svn: 43153
2007-10-18 22:40:57 +00:00
Evan Cheng
aa9a225699
Use SmallVectorImpl instead of SmallVector with hardcoded size in MRegister public interface.
...
llvm-svn: 43150
2007-10-18 21:29:24 +00:00
Christopher Lamb
79dfbed6f6
Fix a misnamed parameter.
...
llvm-svn: 43145
2007-10-18 19:29:45 +00:00
Chris Lattner
84f3461c49
legalizing the ret operation on f64 shouldn't introduce a new
...
i64 bit convert needlessly.
llvm-svn: 43116
2007-10-18 06:17:07 +00:00
Evan Cheng
cdf3609130
Revert 42908 for now.
...
llvm-svn: 42960
2007-10-14 05:57:21 +00:00
Dan Gohman
dc35bd79ca
Change the names used for internal labels to use the current
...
function symbol name instead of a codegen-assigned function
number.
Thanks Evan! :-)
llvm-svn: 42908
2007-10-12 14:53:36 +00:00
Dan Gohman
482732af9d
Set ISD::FPOW to Expand.
...
llvm-svn: 42881
2007-10-11 23:21:31 +00:00
Dan Gohman
a160361c85
Migrate X86 and ARM from using X86ISD::{,I}DIV and ARMISD::MULHILO{U,S} to
...
use ISD::{S,U}DIVREM and ISD::{S,U}MUL_HIO. Move the lowering code
associated with these operators into target-independent in LegalizeDAG.cpp
and TargetLowering.cpp.
llvm-svn: 42762
2007-10-08 18:33:35 +00:00
Evan Cheng
f4cf5dcdd2
- Added a few target hooks to generate load / store instructions from / to any
...
address (not just from / to frameindexes).
- Added target hooks to unfold load / store instructions / SDNodes into separate
load, data processing, store instructions / SDNodes.
llvm-svn: 42621
2007-10-05 01:32:41 +00:00
Dan Gohman
c731c97fac
Use empty() member functions when that's what's being tested for instead
...
of comparing begin() and end().
llvm-svn: 42585
2007-10-03 19:26:29 +00:00
Gordon Henriksen
0b7cf862bc
AsmPrinters overriding getAnalysisUsage should call super.
...
And not super's super, either.
llvm-svn: 42482
2007-09-30 13:39:29 +00:00
Evan Cheng
c1e4e3743b
Allow copyRegToReg to emit cross register classes copies.
...
Tested with "make check"!
llvm-svn: 42346
2007-09-26 06:25:56 +00:00
Dan Gohman
57211c5550
More explicit keywords.
...
llvm-svn: 42316
2007-09-25 20:27:06 +00:00
Evan Cheng
1ff71872c2
Honor user-defined section specification of a global, ignores whether its initializer is null.
...
llvm-svn: 42182
2007-09-21 00:41:19 +00:00
Evan Cheng
8010320365
Enable if-conversion for ARM by default.
...
llvm-svn: 42156
2007-09-20 00:48:22 +00:00
Evan Cheng
d0e360e16e
Avoid referencing deleted instruction.
...
llvm-svn: 42153
2007-09-19 21:48:07 +00:00
Dan Gohman
9da02f5ee2
Remove isReg, isImm, and isMBB, and change all their users to use
...
isRegister, isImmediate, and isMachineBasicBlock, which are equivalent,
and more popular.
llvm-svn: 41958
2007-09-14 20:33:02 +00:00
Bill Wendling
66c22e8fd6
Enable indirect encoding for the personality function
...
llvm-svn: 41873
2007-09-11 23:55:40 +00:00
Evan Cheng
3e18e504ae
Remove (somewhat confusing) Imp<> helper, use let Defs = [], Uses = [] instead.
...
llvm-svn: 41863
2007-09-11 19:55:27 +00:00
Duncan Sands
86e0119822
Fold the adjust_trampoline intrinsic into
...
init_trampoline. There is now only one
trampoline intrinsic.
llvm-svn: 41841
2007-09-11 14:10:23 +00:00
Evan Cheng
f948772f9e
80 col.
...
llvm-svn: 41812
2007-09-10 22:22:23 +00:00
Chris Lattner
6777b72659
Add some notes about better flag handling.
...
llvm-svn: 41808
2007-09-10 21:43:18 +00:00
Owen Anderson
e2f23a3abf
Add lengthof and endof templates that hide a lot of sizeof computations.
...
Patch by Sterling Stein!
llvm-svn: 41758
2007-09-07 04:06:50 +00:00
Dale Johannesen
3cf889f75e
Enhance APFloat to retain bits of NaNs (fixes oggenc).
...
Use APFloat interfaces for more references, mostly
of ConstantFPSDNode.
llvm-svn: 41632
2007-08-31 04:03:46 +00:00
Raul Herbster
ab871baaf8
Instruction formats added used to generate multiply instructions of V5TE.
...
llvm-svn: 41629
2007-08-30 23:34:14 +00:00
Raul Herbster
ff32b62942
Unused relocation type reloc_arm_absolute removed.
...
llvm-svn: 41628
2007-08-30 23:31:35 +00:00
Raul Herbster
1457b2b3b1
Comments added. It now generates V5TE multiply instructions. However, it is still necessary to model PUWLSH bits more clearly.
...
llvm-svn: 41627
2007-08-30 23:29:26 +00:00
Raul Herbster
73489273ae
ARM instruction table was modified by adding information to generate multiply instruction of V5TE.
...
llvm-svn: 41626
2007-08-30 23:25:47 +00:00
Raul Herbster
ae1b924c79
JITInfo now resolves function addrs and also relocations. It always emits a stub.
...
llvm-svn: 41625
2007-08-30 23:21:27 +00:00
Evan Cheng
9a25d98c86
Add a variant of foldMemoryOperand to fold any load / store, not just load / store from / to stack slots.
...
llvm-svn: 41597
2007-08-30 05:52:20 +00:00
Evan Cheng
f7c6effc44
Initial JIT support for ARM by Raul Fernandes Herbster.
...
llvm-svn: 40887
2007-08-07 01:37:15 +00:00
Dan Gohman
5f6a9da530
More explicit keywords.
...
llvm-svn: 40757
2007-08-02 21:21:54 +00:00
Evan Cheng
aa39b39eec
Indexed loads each has 2 outputs.
...
llvm-svn: 40658
2007-08-01 00:12:08 +00:00
Dan Gohman
e379f08b19
More explicit keywords.
...
llvm-svn: 40589
2007-07-30 14:51:59 +00:00
Duncan Sands
644f917358
Support for trampolines, except for X86 codegen which is
...
still under discussion.
llvm-svn: 40549
2007-07-27 12:58:54 +00:00
Dan Gohman
cf0a5349de
Don't ignore the return value of AsmPrinter::doInitialization and
...
AsmPrinter::doFinalization.
llvm-svn: 40487
2007-07-25 19:33:14 +00:00
Evan Cheng
ac1591be42
No more noResults.
...
llvm-svn: 40132
2007-07-21 00:34:19 +00:00
Evan Cheng
9d5df0a5f6
Added -print-emitted-asm to print out JIT generated asm to cerr.
...
llvm-svn: 40123
2007-07-20 21:56:13 +00:00
Evan Cheng
94b5a80b93
Change instruction description to split OperandList into OutOperandList and
...
InOperandList. This gives one piece of important information: # of results
produced by an instruction.
An example of the change:
def ADD32rr : I<0x01, MRMDestReg, (ops GR32:$dst, GR32:$src1, GR32:$src2),
"add{l} {$src2, $dst|$dst, $src2}",
[(set GR32:$dst, (add GR32:$src1, GR32:$src2))]>;
=>
def ADD32rr : I<0x01, MRMDestReg, (outs GR32:$dst), (ins GR32:$src1, GR32:$src2),
"add{l} {$src2, $dst|$dst, $src2}",
[(set GR32:$dst, (add GR32:$src1, GR32:$src2))]>;
llvm-svn: 40033
2007-07-19 01:14:50 +00:00
Evan Cheng
22b0c344db
Only adjust esp around calls in presence of alloca.
...
llvm-svn: 40030
2007-07-19 00:42:58 +00:00
Chris Lattner
396156e00b
no email addrs in file headers
...
llvm-svn: 39962
2007-07-17 05:56:43 +00:00
Anton Korobeynikov
383a324735
Long live the exception handling!
...
This patch fills the last necessary bits to enable exceptions
handling in LLVM. Currently only on x86-32/linux.
In fact, this patch adds necessary intrinsics (and their lowering) which
represent really weird target-specific gcc builtins used inside unwinder.
After corresponding llvm-gcc patch will land (easy) exceptions should be
more or less workable. However, exceptions handling support should not be
thought as 'finished': I expect many small and not so small glitches
everywhere.
llvm-svn: 39855
2007-07-14 14:06:15 +00:00
Dale Johannesen
85ee72f7ba
ARM: make branch folder remove unconditional branches
...
following jump tables that it earlier inserted. This
would be OK on other targets but is needed for correctness
only on ARM (constant islands needs to find jump tables).
llvm-svn: 39782
2007-07-12 16:45:35 +00:00
Dale Johannesen
e59411d056
Fix hang compiling TimberWolf (allow for islands
...
of size other than 4).
llvm-svn: 39743
2007-07-11 18:32:38 +00:00
Evan Cheng
94579dbd2e
Didn't mean the last commit. Revert.
...
llvm-svn: 38515
2007-07-10 22:00:16 +00:00
Evan Cheng
effa7467b6
Update.
...
llvm-svn: 38513
2007-07-10 21:49:47 +00:00
Evan Cheng
9d41b311fb
Remove clobbersPred. Add an OptionalDefOperand to instructions which have the 's' bit.
...
llvm-svn: 38501
2007-07-10 18:08:01 +00:00
Chris Lattner
517290ae52
The various "getModuleMatchQuality" implementations should return
...
zero if they see a target triple they don't understand.
llvm-svn: 38463
2007-07-09 17:25:29 +00:00
Evan Cheng
881248c4e1
No need for ccop anymore.
...
llvm-svn: 37965
2007-07-06 23:34:09 +00:00
Evan Cheng
3650b2c278
Incorrect check.
...
llvm-svn: 37962
2007-07-06 23:23:19 +00:00
Evan Cheng
76a97c5f8a
Do away with ImmutablePredicateOperand.
...
llvm-svn: 37961
2007-07-06 23:22:46 +00:00
Evan Cheng
0a42fdf346
Print the s bit if the instruction is toggled to its CPSR setting form.
...
llvm-svn: 37932
2007-07-06 01:01:34 +00:00
Evan Cheng
5c66888580
PredicateDefOperand -> OptionalDefOperand.
...
llvm-svn: 37931
2007-07-06 01:00:49 +00:00
Evan Cheng
9546a5c7de
Initial ARM JIT support by Raul Fernandes Herbster.
...
llvm-svn: 37926
2007-07-05 21:15:40 +00:00
Evan Cheng
085314b455
Unbreak the build.
...
llvm-svn: 37914
2007-07-05 17:13:19 +00:00
Gabor Greif
e16561cd5d
Here is the bulk of the sanitizing.
...
Almost all occurrences of "bytecode" in the sources have been eliminated.
llvm-svn: 37913
2007-07-05 17:07:56 +00:00
Evan Cheng
94f04c6fc9
Reflects the chanegs made to PredicateOperand.
...
llvm-svn: 37898
2007-07-05 07:18:20 +00:00
Evan Cheng
a7f77599a4
Added ARM::CPSR to represent ARM CPSR status register.
...
llvm-svn: 37897
2007-07-05 07:17:13 +00:00
Evan Cheng
7e90b11550
Unfortunately we now require C++ code to isel Bcc, conditional moves, etc.
...
llvm-svn: 37896
2007-07-05 07:15:27 +00:00
Evan Cheng
aa3b8014bd
Each ARM use predicate operand is now made up of two components. The new component is the CPSR register.
...
llvm-svn: 37895
2007-07-05 07:13:32 +00:00
Evan Cheng
49ffa1e488
Added ARM::CPSR to represent ARM CPSR status register.
...
llvm-svn: 37894
2007-07-05 07:11:03 +00:00
John Criswell
2660cef6d7
Convert .cvsignore files
...
llvm-svn: 37801
2007-06-29 16:35:07 +00:00
Evan Cheng
335c65e9a4
Silence a warning.
...
llvm-svn: 37737
2007-06-26 18:31:22 +00:00
Dan Gohman
e8c1e428f2
Revert the earlier change that removed the M_REMATERIALIZABLE machine
...
instruction flag, and use the flag along with a virtual member function
hook for targets to override if there are instructions that are only
trivially rematerializable with specific operands (i.e. constant pool
loads).
llvm-svn: 37728
2007-06-26 00:48:07 +00:00
Owen Anderson
0c550df9d2
Fix the build.
...
llvm-svn: 37705
2007-06-22 16:59:54 +00:00
Dan Gohman
309d3d51b3
Move ComputeMaskedBits, MaskedValueIsZero, and ComputeNumSignBits from
...
TargetLowering to SelectionDAG so that they have more convenient
access to the current DAG, in preparation for the ValueType routines
being changed from standalone functions to members of SelectionDAG for
the pre-legalize vector type changes.
llvm-svn: 37704
2007-06-22 14:59:07 +00:00
Dale Johannesen
485531ea9b
Quote complex names for Darwin X86 and ARM.
...
llvm-svn: 37700
2007-06-22 00:54:56 +00:00
Evan Cheng
77d61e6f6d
Be more conservative of duplicating blocks.
...
llvm-svn: 37669
2007-06-19 23:55:02 +00:00
Evan Cheng
c3c949b473
Allow predicated immediate ARM to ARM calls.
...
llvm-svn: 37659
2007-06-19 21:05:09 +00:00
Dan Gohman
9e82064924
Replace M_REMATERIALIZIBLE and the newly-added isOtherReMaterializableLoad
...
with a general target hook to identify rematerializable instructions. Some
instructions are only rematerializable with specific operands, such as loads
from constant pools, while others are always rematerializable. This hook
allows both to be identified as being rematerializable with the same
mechanism.
llvm-svn: 37644
2007-06-19 01:48:05 +00:00
Evan Cheng
a7ca624028
Replace TargetInstrInfo::CanBeDuplicated() with a M_NOT_DUPLICABLE bit.
...
llvm-svn: 37643
2007-06-19 01:26:51 +00:00
Evan Cheng
36b1f5476e
Instructions with unique labels or embedded jumptables cannot be duplicated during ifcvt.
...
llvm-svn: 37606
2007-06-15 21:15:00 +00:00
Dale Johannesen
c68554683d
Handle blocks with 2 unconditional branches in AnalyzeBranch.
...
llvm-svn: 37571
2007-06-13 17:59:52 +00:00
Evan Cheng
5514bbef46
Add a utility routine to check for unpredicated terminator instruction.
...
llvm-svn: 37528
2007-06-08 21:59:56 +00:00
Lauro Ramos Venancio
c7ebbaa10e
Define AsmTransCBE for ARM.
...
llvm-svn: 37527
2007-06-08 21:06:23 +00:00
Evan Cheng
6740da9407
Fix ARM condition code subsumission check.
...
llvm-svn: 37517
2007-06-08 09:14:47 +00:00
Evan Cheng
f62a5afb98
tBcc is not a barrier.
...
llvm-svn: 37516
2007-06-08 09:13:23 +00:00
Evan Cheng
842be09d86
Stupid cut-n-paste bug caused me soooo much grief. Why wasn't there a compilation warning? I blame it on the FE folks.
...
llvm-svn: 37484
2007-06-07 01:37:54 +00:00
Evan Cheng
e8c3cbf971
Mark these instructions clobbersPred. They modify the condition code register.
...
llvm-svn: 37468
2007-06-06 10:17:05 +00:00
Evan Cheng
5c48958a61
Print predicate of the second instruction of the two-piece constant MI.
...
llvm-svn: 37437
2007-06-05 18:55:18 +00:00
Evan Cheng
252695f0f6
PIC label asm printing cosmetic changes.
...
llvm-svn: 37434
2007-06-05 07:36:38 +00:00