Mon P Wang [Sat, 18 Oct 2008 02:48:13 +0000 (02:48 +0000)]
Make llvm memory barrier available as an intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57750
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 18 Oct 2008 02:06:02 +0000 (02:06 +0000)]
Teach DAGCombine to fold constant offsets into GlobalAddress nodes,
and add a TargetLowering hook for it to use to determine when this
is legal (i.e. not in PIC mode, etc.)
This allows instruction selection to emit folded constant offsets
in more cases, such as the included testcase, eliminating the need
for explicit arithmetic instructions.
This eliminates the need for the C++ code in X86ISelDAGToDAG.cpp
that attempted to achieve the same effect, but wasn't as effective.
Also, fix handling of offsets in GlobalAddressSDNodes in several
places, including changing GlobalAddressSDNode's offset from
int to int64_t.
The Mips, Alpha, Sparc, and CellSPU targets appear to be
unaware of GlobalAddress offsets currently, so set the hook to
false on those targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57748
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sat, 18 Oct 2008 01:03:45 +0000 (01:03 +0000)]
Revert r57699. It's causing regressions in
test/CodeGen/X86/2008-09-17-inline-asm-1.ll
and a few others, and it breaks the llvm-gcc build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57747
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 17 Oct 2008 21:42:45 +0000 (21:42 +0000)]
Use the opcode predicates, instead of duplicating the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57735
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 17 Oct 2008 21:39:27 +0000 (21:39 +0000)]
This is now partly done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57734
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 17 Oct 2008 21:38:40 +0000 (21:38 +0000)]
This is done.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57733
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 17 Oct 2008 21:16:08 +0000 (21:16 +0000)]
Factor out the code for mapping LLVM IR condition opcodes to
ISD condition opcodes into helper functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57726
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 17 Oct 2008 21:02:22 +0000 (21:02 +0000)]
Add implicit defs of XMM8 to XMM15 on 32-bit call instructions. While this is not technically true, it tells tblgen that these instructions "clobber" the entire XMM register file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57723
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 17 Oct 2008 21:00:09 +0000 (21:00 +0000)]
Add RCBarriers to TargetInstrDesc. It's a list of register classes the given instruction can "clobber". For example, on x86 the call instruction can modify all of the XMM and fp stack registers.
TableGen has been taught to generate the lists from instruction definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57722
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 17 Oct 2008 20:56:41 +0000 (20:56 +0000)]
Fix PR2898. Spiller delete a store for reuse before it knows for sure the reuse happened.
Patch by Lang Hames!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57720
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 17 Oct 2008 19:59:51 +0000 (19:59 +0000)]
add support for 128 bit aggregates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57715
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 17 Oct 2008 18:48:57 +0000 (18:48 +0000)]
The Dwarf writer was comparing mangled and unmangled names for C++ code when we
have an unreachable block in a function. This was triggering the assert. This is
a horrid hack to cover this up.
Oh! for a good debug info architecture!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57714
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Fri, 17 Oct 2008 18:22:58 +0000 (18:22 +0000)]
Added MemIntrinsicNode which is useful to represent target intrinsics that
touches memory and need an associated MemOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57712
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 17 Oct 2008 18:18:45 +0000 (18:18 +0000)]
Factor out the code for mapping LLVM IR condition opcodes to
ISD condition opcodes into helper functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57710
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 17 Oct 2008 18:15:05 +0000 (18:15 +0000)]
add support for 128 bit inputs on both x86-64 and x86-32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57709
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 17 Oct 2008 17:59:52 +0000 (17:59 +0000)]
Fix a bug where the x86 backend would reject 64-bit r constraints when
in 32-bit mode instead of assigning a register pair. This has nothing to
do with PR2356, but I happened to notice it while working on it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57704
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 17 Oct 2008 17:52:49 +0000 (17:52 +0000)]
Fix PR2356 on PowerPC: if we have an input and output that are tied together
that have different sizes (e.g. i32 and i64) make sure to reserve registers for
the bigger operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57699
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 17 Oct 2008 17:26:48 +0000 (17:26 +0000)]
remove an xfailed test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57695
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 17 Oct 2008 17:26:19 +0000 (17:26 +0000)]
remove this test: it is xfailed anyway, and is failing for a reason
other than why it was xfailed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57694
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 17 Oct 2008 17:14:20 +0000 (17:14 +0000)]
Fix lfence and mfence encoding. These look like MRM5r and MRM6r instructions except they do not have any operands. The RegModRM byte is encoded with register number 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57692
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 17 Oct 2008 17:12:18 +0000 (17:12 +0000)]
getX86RegNum has long been moved to X86RegisterInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57691
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 17 Oct 2008 17:05:25 +0000 (17:05 +0000)]
refactor some code into a helper method, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57690
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 17 Oct 2008 16:47:46 +0000 (16:47 +0000)]
Keep track of *which* input constraint matches an output
constraint. Reject asms where an output has multiple
input constraints tied to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57687
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 17 Oct 2008 16:21:11 +0000 (16:21 +0000)]
add an assert so that PR2356 explodes instead of running off an
array. Improve some minor comments, refactor some helpers in
AsmOperandInfo. No functionality change for valid code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57686
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Fri, 17 Oct 2008 14:43:58 +0000 (14:43 +0000)]
remove spurious space in link
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57677
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Fri, 17 Oct 2008 08:31:36 +0000 (08:31 +0000)]
Add comment on how tagged pointers are
distinguished from normal (untagged) ones
as per review comment.
I am sufficiently unaquainted with doxygen to
defer the markup to someone with more experience.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57676
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 17 Oct 2008 06:16:07 +0000 (06:16 +0000)]
Fix a very subtle spiller bug: UpdateKills should not forget to track defs of aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57673
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 17 Oct 2008 06:11:48 +0000 (06:11 +0000)]
add some simple hacky long double support for the CBE. This
should work for intel long double, but ppc long double aborts
in convert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57672
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 17 Oct 2008 04:40:39 +0000 (04:40 +0000)]
Use INT64_C to emit constant values, to avoid problems with
constants that don't fit in an int. This fixes
"this decimal constant is unsigned only in ISO C90"
warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57668
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 17 Oct 2008 01:33:43 +0000 (01:33 +0000)]
Fun x86 encoding tricks: when adding an immediate value of 128,
use a SUB instruction instead of an ADD, because -128 can be
encoded in an 8-bit signed immediate field, while +128 can't be.
This avoids the need for a 32-bit immediate field in this case.
A similar optimization applies to 64-bit adds with 0x80000000,
with the 32-bit signed immediate field.
To support this, teach tablegen how to handle 64-bit constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57663
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 17 Oct 2008 01:23:35 +0000 (01:23 +0000)]
Define patterns for shld and shrd that match immediate
shift counts, and patterns that match dynamic shift counts
when the subtract is obscured by a truncate node.
Add DAGCombiner support for recognizing rotate patterns
when the shift counts are defined by truncate nodes.
Fix and simplify the code for commuting shld and shrd
instructions to work even when the given instruction doesn't
have a parent, and when the caller needs a new instruction.
These changes allow LLVM to use the shld, shrd, rol, and ror
instructions on x86 to replace equivalent code using two
shifts and an or in many more cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57662
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 17 Oct 2008 00:56:52 +0000 (00:56 +0000)]
Use 0 instead of false to return a null pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57660
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 16 Oct 2008 23:57:54 +0000 (23:57 +0000)]
Fix this test so it actually runs the grep lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57653
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 16 Oct 2008 20:18:31 +0000 (20:18 +0000)]
Trim #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57649
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 16 Oct 2008 17:02:50 +0000 (17:02 +0000)]
fix typo noticed by sdt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57644
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Thu, 16 Oct 2008 15:33:02 +0000 (15:33 +0000)]
Introduce a typing refinenement on tagged data
using the 'volatile' qualifier. This should not have any operational consequences
on code, because tags should always be stripped off (giving a non-volatile pointer)
before dereferencing. The new qualification is there to catch some attempts to use
tagged pointers in a context where an untagged pointer is appropriate.
Notably this approach does not catch dereferencing of tagged pointers, but helps
in separating the two concepts a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57641
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Thu, 16 Oct 2008 14:02:29 +0000 (14:02 +0000)]
Re-apply Makefile changes. Fix build with srcdir != objdir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57636
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 16 Oct 2008 13:02:33 +0000 (13:02 +0000)]
Fix warnings about mb/me being potentially used
uninitialized in these functions with gcc-4.3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57635
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 16 Oct 2008 09:14:58 +0000 (09:14 +0000)]
Fix "large integer implicitly truncated to unsigned type"
warning on x86-64 with gcc-4.3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57634
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 16 Oct 2008 08:56:46 +0000 (08:56 +0000)]
Testcase for PR2762.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57633
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 16 Oct 2008 07:04:06 +0000 (07:04 +0000)]
add some notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57631
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 16 Oct 2008 06:46:12 +0000 (06:46 +0000)]
add some notes and a file to collect unimplemented features in the
x86 backend. These will all be answered with "patches welcome", so
a PR doesn't help drive them along.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57630
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 16 Oct 2008 06:16:50 +0000 (06:16 +0000)]
mark some targets as experimental. Andrew, if you think that Alpha is
basically working, feel free to remove the tag. The other targets have
really basic things that break them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57628
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 16 Oct 2008 06:00:36 +0000 (06:00 +0000)]
Verify prefetch arguments, PR2576.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57626
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 16 Oct 2008 05:26:51 +0000 (05:26 +0000)]
apply Eli's patch for PR2165 and provide a testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57625
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 16 Oct 2008 01:49:15 +0000 (01:49 +0000)]
Const-ify several TargetInstrInfo methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57622
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 16 Oct 2008 01:47:47 +0000 (01:47 +0000)]
Remove an unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57621
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 16 Oct 2008 01:24:45 +0000 (01:24 +0000)]
Fix Instruction::isIdenticalTo and isSameOperationAs to recognize
additional information in Loads, Stores, Calls, Invokes,
InsertValueInsts, and ExtractValueInsts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57620
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Thu, 16 Oct 2008 01:21:44 +0000 (01:21 +0000)]
Fix a calculation error in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57619
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 16 Oct 2008 01:06:18 +0000 (01:06 +0000)]
Rename AliasSet to SubRegs, to reflect changes in the surrounding code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57618
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 16 Oct 2008 00:20:14 +0000 (00:20 +0000)]
Move the include of MachineLocation.h into MachineModuleInfo.h
because it declares a std::vector<MachineMove>, and strict
concept checking requires the definition of MachineMove to be
available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57617
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 16 Oct 2008 00:15:24 +0000 (00:15 +0000)]
Implement a SmallVector insert method that can insert multiple
copies of a value, and add several additional utilities to make
SmallVector better conform to the Container concept.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57616
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 16 Oct 2008 00:12:39 +0000 (00:12 +0000)]
Fix several places that called mapped_iterator's constructor without
passing in a function object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57615
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 16 Oct 2008 00:11:23 +0000 (00:11 +0000)]
Fix a subtle bug in DeadMachineInstructionElim's liveness
computation. A def of a register doesn't necessarily kill
live super-registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57614
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 16 Oct 2008 00:03:00 +0000 (00:03 +0000)]
Fix the predicate for memop64 to be a regular load, not just
an unindexed load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57612
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 15 Oct 2008 23:19:35 +0000 (23:19 +0000)]
Teach instcombine's visitLoad to scan back several instructions
to find opportunities for store-to-load forwarding or load CSE,
in the same way that visitStore scans back to do DSE. Also, define
a new helper function for testing whether the addresses of two
memory accesses are known to have the same value, and use it in
both visitStore and visitLoad.
These two changes allow instcombine to eliminate loads in code
produced by front-ends that frequently emit obviously redundant
addressing for memory references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57608
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 15 Oct 2008 22:56:21 +0000 (22:56 +0000)]
Correct the name of isTrapping in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57606
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 15 Oct 2008 22:55:03 +0000 (22:55 +0000)]
Fix whitespace in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57605
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 15 Oct 2008 22:34:34 +0000 (22:34 +0000)]
Testcase for PR2894.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57604
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolas Geoffray [Wed, 15 Oct 2008 20:25:04 +0000 (20:25 +0000)]
Remove naming Tilmann for generics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57599
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 15 Oct 2008 20:22:44 +0000 (20:22 +0000)]
Add global variable to test for consistency
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57597
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 15 Oct 2008 20:13:10 +0000 (20:13 +0000)]
This is not failing anymore
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57596
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 15 Oct 2008 20:10:50 +0000 (20:10 +0000)]
Also properly handle linking of strong alias and weak global
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57595
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 15 Oct 2008 20:10:08 +0000 (20:10 +0000)]
Properly handle linking of strong alias with weak function, this fixes PR2883
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57594
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 15 Oct 2008 18:27:15 +0000 (18:27 +0000)]
Testcase for PR1638.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57590
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 15 Oct 2008 18:02:08 +0000 (18:02 +0000)]
Fix a missing space after the return type in invoke statements.
This fixes PR2894.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57589
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 16:56:14 +0000 (16:56 +0000)]
Fix PR2115 by doxygenating Use more, and make some more methods private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57587
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 16:33:52 +0000 (16:33 +0000)]
move PR1941 here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57586
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 15 Oct 2008 16:20:13 +0000 (16:20 +0000)]
Unbreak the build. Please test out the proper fix for this by compiling LLVM
with the build directory different from the source directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57583
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 16:06:03 +0000 (16:06 +0000)]
move PR1604 here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57582
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 16:02:15 +0000 (16:02 +0000)]
move PR1488 into this file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57579
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 15 Oct 2008 14:22:06 +0000 (14:22 +0000)]
Temporary revert r57567 and unbreak the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57578
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 15 Oct 2008 12:05:02 +0000 (12:05 +0000)]
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57577
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 15 Oct 2008 12:04:36 +0000 (12:04 +0000)]
fix memleak in GetForwardRefForGlobal()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57576
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 15 Oct 2008 11:20:21 +0000 (11:20 +0000)]
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57575
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 15 Oct 2008 11:19:34 +0000 (11:19 +0000)]
fix memleak in getTypeVal()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57574
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 15 Oct 2008 11:11:12 +0000 (11:11 +0000)]
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57573
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 15 Oct 2008 11:10:21 +0000 (11:10 +0000)]
fix memleak in ResolveTypeTo()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57572
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 15 Oct 2008 10:47:24 +0000 (10:47 +0000)]
catch one more typo, canonicalize LLVMdev
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57571
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 15 Oct 2008 10:29:51 +0000 (10:29 +0000)]
fix some validation errors, improve formatting, squash a strange plural
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57570
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 15 Oct 2008 09:52:56 +0000 (09:52 +0000)]
remove legacy interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57569
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Wed, 15 Oct 2008 09:29:13 +0000 (09:29 +0000)]
llvmc2: Documentation update. Describe recent work on plugins.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57568
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Wed, 15 Oct 2008 09:28:50 +0000 (09:28 +0000)]
llvmc2: Some Makefile fixes and renames.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57567
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Wed, 15 Oct 2008 09:27:44 +0000 (09:27 +0000)]
Use (a slightly modified) llvm.css for llvmc2 docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57566
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 15 Oct 2008 06:50:19 +0000 (06:50 +0000)]
Now that predicates can be composed, simplify several of
the predicates by extending simple predicates to create
more complex predicates instead of duplicating the logic
for the simple predicates.
This doesn't reduce much redundancy in DAGISelEmitter.cpp's
generated source yet; that will require improvements to
DAGISelEmitter.cpp's instruction sorting, to make it more
effectively group nodes with similar predicates together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57565
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Wed, 15 Oct 2008 06:27:16 +0000 (06:27 +0000)]
Removed pinsrd and pinsrq intrinsics because the code generator does not support
them since they map to insert element
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57564
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 15 Oct 2008 06:17:21 +0000 (06:17 +0000)]
Add support for having multiple predicates on a TreePatternNode.
This will allow predicates to be composed, which will allow the
predicate definitions to become less redundant, and eventually
will allow DAGISelEmitter.cpp to emit less redundant code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57562
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 06:16:57 +0000 (06:16 +0000)]
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57561
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 06:16:45 +0000 (06:16 +0000)]
Fix the .ll grammar rules to allow any type before an 'i32', not just an
integer type. Invalid things like 'float 42' are now rejected by the
semantic analysis in the productions not the parser. This fixes PR2733.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57560
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 06:03:48 +0000 (06:03 +0000)]
regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57559
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 06:03:37 +0000 (06:03 +0000)]
Eliminate the "IntType ::= INTTYPE" production, just use
INTTYPE everywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57558
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 05:53:25 +0000 (05:53 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57557
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 05:38:32 +0000 (05:38 +0000)]
add support for folding immediates into stores when they
are due to argument passing in calls. This is significant because
it hits all immediate arguments to calls on x86-32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57556
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 05:30:52 +0000 (05:30 +0000)]
fold immediates into stores in simple cases, this produces diffs like
this:
- movl $0, %eax
- movl %eax, _yy_n_chars
+ movl $0, _yy_n_chars
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57555
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 05:18:04 +0000 (05:18 +0000)]
fold compare of null pointer into compare with 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57553
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 05:07:36 +0000 (05:07 +0000)]
Some minor cleanups:
1. Compute action in X86SelectSelect based on MVT instead of type.
2. Use TLI.getValueType(..) instead of MVT::getVT(..) because the former
handles pointers and the later doesn't.
3. Don't pass TLI into isTypeLegal, since it already has access to it as
an ivar.
#2 gives fast isel some minor new functionality: handling load/stores of
pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57552
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 04:32:45 +0000 (04:32 +0000)]
Use switch on VT instead of Type* comparisons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57551
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 04:29:23 +0000 (04:29 +0000)]
Use X86FastEmitCompare for FCMP_OEQ and FCMP_UNE: it doesn't
change the generated code, but makes the code simpler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57550
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 04:26:38 +0000 (04:26 +0000)]
refactor compare emission out into a new X86FastEmitCompare method,
which makes it easy to share the compare/imm folding logic with 'setcc'.
This shaves a bunch of instructions off the common select case, which
happens a lot in llvm-gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57549
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Oct 2008 04:13:29 +0000 (04:13 +0000)]
Fold immediates into compares when possible, producing "cmp $4, %eax" instead of
loading 4 into a register and then doing the compare.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57548
91177308-0d34-0410-b5e6-
96231b3b80d8