Chris Lattner [Thu, 25 Feb 2010 06:53:39 +0000 (06:53 +0000)]
factor the print method better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97125
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 25 Feb 2010 06:53:04 +0000 (06:53 +0000)]
Dump the presence of attached metadata even if we don't know what it is. This
format is not parsable, even if the module is legal. To get parsable output,
dump the module instead of the function or smaller, since metadata kind are
attached to the module (not the context).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97124
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Feb 2010 06:49:58 +0000 (06:49 +0000)]
add methods to do equality checks and get hashes of Matchers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97123
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 25 Feb 2010 06:39:10 +0000 (06:39 +0000)]
Modernize comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97121
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 25 Feb 2010 06:38:51 +0000 (06:38 +0000)]
Correct whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97120
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 25 Feb 2010 06:34:33 +0000 (06:34 +0000)]
Try r96559 for the third time. This time the shared library is only built if
--enable-shared is passed to configure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97119
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Thu, 25 Feb 2010 03:54:49 +0000 (03:54 +0000)]
Each field of auxiliary debug entry is only 1 byte long.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97108
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 25 Feb 2010 03:28:51 +0000 (03:28 +0000)]
Added tNOP for disassembly only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97105
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 25 Feb 2010 03:04:36 +0000 (03:04 +0000)]
Truncate from i64 to i32 is "free" on x86-32, because it involves
just discarding one of the registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97100
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Thu, 25 Feb 2010 02:32:54 +0000 (02:32 +0000)]
Revert this patch for the time being. Needs more testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97099
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Thu, 25 Feb 2010 02:21:11 +0000 (02:21 +0000)]
Added tSVC and tTRAP for disassembly only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97098
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Feb 2010 02:09:00 +0000 (02:09 +0000)]
formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97097
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Feb 2010 02:04:40 +0000 (02:04 +0000)]
rename fooMatcherNode to fooMatcher.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97096
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Feb 2010 01:57:41 +0000 (01:57 +0000)]
add some noop code to push it out of my tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97094
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Feb 2010 01:56:48 +0000 (01:56 +0000)]
rename PushMatcherNode -> ScopeMatcherNode to more accurately
reflect what it does. Switch the sense of the Next and the Check
arms to be more logical. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97093
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Thu, 25 Feb 2010 01:53:17 +0000 (01:53 +0000)]
Large stack frame patch for the CellSPU: handle stack frames that exceed 8176
(511*16) bytes register displacement (D-form).
NOTE: This is a potential headache, given the SPU's local core limitations,
allowing the software developer to commit stack overrun suicide unknowingly.
Also, large SPU stack frames will cause code size explosion. But, one presumes
that the software developer knows what they're doing...
Contributed by Kalle.Raiskila@nokia.com, edited slightly before commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97091
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Thu, 25 Feb 2010 01:21:38 +0000 (01:21 +0000)]
Filter the future all-of-llvm shared library out of the llvm-config
results. I'm checking this in before the shared library so that I can
tell if it breaks anything on its own.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97089
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 25 Feb 2010 00:24:52 +0000 (00:24 +0000)]
MC'ize padding when padding the ULEB128 value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97087
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 25 Feb 2010 00:03:03 +0000 (00:03 +0000)]
add a fixme for an experiment that defeated me for the time being.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97081
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 24 Feb 2010 23:34:35 +0000 (23:34 +0000)]
LLVM puts padding bytes in the __gcc_except_tab section after the
GCC_except_table label but before the Lexception, which the FDE references.
This causes problems as the FDE does not point to the start of an LSDA chunk.
Use an unnormalized uleb128 for the call-site table length that includes the
padding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97078
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Feb 2010 22:52:52 +0000 (22:52 +0000)]
fix a bug I introduced by checking the wrong node's VT in OPC_CheckChildXType
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97074
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Feb 2010 22:44:06 +0000 (22:44 +0000)]
clean up various VT manipulations, patch by Micah Villmow! PR6337
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97072
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 24 Feb 2010 22:43:17 +0000 (22:43 +0000)]
Create a stack frame on ARM when
- Function uses all scratch registers AND
- Function does not use any callee saved registers AND
- Stack size is too big to address with immediate offsets.
In this case a register must be scavenged to calculate the address of a stack
object, and the scavenger needs a spare register or emergency spill slot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97071
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Feb 2010 22:33:41 +0000 (22:33 +0000)]
fix PR5954, patch by Roman Divacky.
I don't have a great way to test this myself (it's linux/bsd only),
but Roman says it works. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97069
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 24 Feb 2010 22:15:53 +0000 (22:15 +0000)]
Check for comparisons of +/- zero when optimizing less-than-or-equal and
greater-than-or-equal SELECT_CCs to NEON vmin/vmax instructions. This is
only allowed when UnsafeFPMath is set or when at least one of the operands
is known to be nonzero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97065
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 24 Feb 2010 22:05:23 +0000 (22:05 +0000)]
Make getTypeSizeInBits work correctly for array types; it should return
the number of value bits, not the number of bits of allocation for in-memory
storage.
Make getTypeStoreSize and getTypeAllocSize work consistently for arrays and
vectors.
Fix several places in CodeGen which compute offsets into in-memory vectors
to use TargetData information.
This fixes PR1784.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97064
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Feb 2010 21:34:04 +0000 (21:34 +0000)]
convert cycle checker to smallptrset, add comments and make it
more elegant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97059
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Feb 2010 21:25:08 +0000 (21:25 +0000)]
revert david's patch which does not even build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97057
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 24 Feb 2010 20:59:49 +0000 (20:59 +0000)]
Use a SmallPtrSet as suggested by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97056
91177308-0d34-0410-b5e6-
96231b3b80d8
Wesley Peck [Wed, 24 Feb 2010 20:16:27 +0000 (20:16 +0000)]
Adding function "lookupGCCName" to MBlazeIntrinsicInfo
Adding the function "lookupGCCName" to the MBlazeIntrinsicInfo
class to support the Clang MicroBlaze target.
Additionally, minor fixes which remove some unused PIC code
(PIC is not supported yet in the MicroBlaze backend) and
removed some unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97054
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Feb 2010 20:15:25 +0000 (20:15 +0000)]
contract movechild+checktype into a new checkchild node, shrinking the
x86 table by 1200 bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97053
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Wed, 24 Feb 2010 20:06:07 +0000 (20:06 +0000)]
Added Vector Swap (VSWPd and VSWPq) instructions for disassembly only.
A8.6.405
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97052
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Feb 2010 19:52:48 +0000 (19:52 +0000)]
split the movechild/record/moveparent -> recordchild optzn into a
movechild/record -> recordchild/movechild and
movechild/moveparent -> noop xforms. This slightly shrinks the tables
(x86 to 117454) and enables adding future improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97051
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 24 Feb 2010 19:31:47 +0000 (19:31 +0000)]
ConstantFoldInstOperands can theoretically return null if it
didn't fold anything.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97049
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 24 Feb 2010 19:31:06 +0000 (19:31 +0000)]
Simplify this code; these casts aren't necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97048
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Feb 2010 19:17:12 +0000 (19:17 +0000)]
emit a histogram of the opcodes in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97047
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 24 Feb 2010 18:57:08 +0000 (18:57 +0000)]
Stay away from str <undef> in ARMLoadStoreOpt. This pass does not understand
<undef> operands, and can cause scavenger failures when it translates
<kill,undef> to <kill>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97046
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Wed, 24 Feb 2010 18:00:40 +0000 (18:00 +0000)]
Fixed typo of opcodestr, should be "vst1", not "vld1".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97044
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 24 Feb 2010 17:31:30 +0000 (17:31 +0000)]
Convert a few more backedge-taken count functions to use BackedgeTakenInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97042
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 24 Feb 2010 17:05:47 +0000 (17:05 +0000)]
Speculatively revert r97011, "Re-apply 96540 and 96556 with fixes.", again in
the hopes of fixing PPC bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97040
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 24 Feb 2010 08:48:04 +0000 (08:48 +0000)]
Reapply r97010, the speculative revert failed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97036
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Feb 2010 07:41:11 +0000 (07:41 +0000)]
lets not break the old isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97034
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Feb 2010 07:35:09 +0000 (07:35 +0000)]
Since the new instruction selector now works, I don't need to keep
the old one around for comparative purposes: have the
ENABLE_NEW_ISEL #define (which is not enabled on mainline) stop
emitting the old isel at all, yay for build time win.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97033
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Feb 2010 07:31:45 +0000 (07:31 +0000)]
implement a simple proof-of-concept optimization for
the new isel: fold movechild+record+moveparent into a
single recordchild N node. This shrinks the X86 table
from 125443 to 117502 bytes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97031
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Feb 2010 07:06:50 +0000 (07:06 +0000)]
The new isel passes all tests, time to start making it go fast.
Also add an easy macro at the top of DAGISelEmitter.cpp to enable
it. Lets see if I can avoid accidentally turning it on :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97029
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 24 Feb 2010 07:06:20 +0000 (07:06 +0000)]
Add svn:ignore properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97028
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 24 Feb 2010 06:55:22 +0000 (06:55 +0000)]
Speculatively revert r97010, "Add an argument to PHITranslateValue to specify
the DominatorTree. ...", in hopes of restoring poor old PPC bootstrap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97027
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 24 Feb 2010 06:52:40 +0000 (06:52 +0000)]
When forming SSE min and max nodes for UGE and ULE comparisons, it's
necessary to swap the operands to handle NaN and negative zero properly.
Also, reintroduce logic for checking for NaN conditions when forming
SSE min and max instructions, fixed to take into consideration NaNs and
negative zeros. This allows forming min and max instructions in more
cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97025
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 24 Feb 2010 06:46:09 +0000 (06:46 +0000)]
Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97024
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Feb 2010 06:11:37 +0000 (06:11 +0000)]
Change the scheduler from adding nodes in allnodes order
to adding them in a determinstic order (bottom up from
the root) based on the structure of the graph itself.
This updates tests for some random changes, interesting
bits: CodeGen/Blackfin/promote-logic.ll no longer crashes.
I have no idea why, but that's good right?
CodeGen/X86/2009-07-16-LoadFoldingBug.ll also fails, but
now compiles to have one fewer constant pool entry, making
the expected load that was being folded disappear. Since it
is an unreduced mass of gnast, I just removed it.
This fixes PR6370
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97023
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 24 Feb 2010 06:09:03 +0000 (06:09 +0000)]
Remove an unused variable. Was this intentional?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97022
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Feb 2010 05:33:42 +0000 (05:33 +0000)]
The new isel was not properly handling patterns that covered
internal nodes with flag results. Record these with a new
OPC_MarkFlagResults opcode and use this to update the interior
nodes' flag results properly. This fixes CodeGen/X86/i256-add.ll
with the new isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97021
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 24 Feb 2010 04:24:44 +0000 (04:24 +0000)]
add node #'s to debug dumps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97019
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Wed, 24 Feb 2010 02:57:20 +0000 (02:57 +0000)]
Added for disassembly VST1 (multiple single elements) which stores elements to
memory from three or four registers and VST2 (multiple two-element structures)
which stores to memory from two double-spaced registers.
A8.6.391 & A8.6.393
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97018
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Wed, 24 Feb 2010 02:56:25 +0000 (02:56 +0000)]
Changed the table generator so that the X86
disassembler never recognizes InitReg instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97017
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 24 Feb 2010 02:15:43 +0000 (02:15 +0000)]
handle very large call frames when require SPAdj != 0 for Thumb1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97013
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 24 Feb 2010 01:43:03 +0000 (01:43 +0000)]
LowerCall() should always do getCopyFromReg() to reference the stack pointer.
Machine instruction selection is much happier when operands are in virtual
registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97012
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 24 Feb 2010 01:42:31 +0000 (01:42 +0000)]
Re-apply 96540 and 96556 with fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97011
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 24 Feb 2010 01:39:00 +0000 (01:39 +0000)]
Add an argument to PHITranslateValue to specify the DominatorTree. If this
argument is non-null, pass it along to PHITranslateSubExpr so that it can
prefer using existing values that dominate the PredBB, instead of just
blindly picking the first equivalent value that it finds on a uselist.
Also when the DominatorTree is specified, have PHITranslateValue filter
out any result that does not dominate the PredBB. This is basically just
refactoring the check that used to be in GetAvailablePHITranslatedSubExpr
and also in GVN.
Despite my initial expectations, this change does not affect the results
of GVN for any testcases that I could find, but it should help compile time.
Before this change, if PHITranslateSubExpr picked a value that does not
dominate, PHITranslateWithInsertion would then insert a new value, which GVN
would later determine to be redundant and would replace. By picking a good
value to begin with, we save GVN the extra work of inserting and then
replacing a new value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97010
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 24 Feb 2010 00:39:35 +0000 (00:39 +0000)]
DIV8r must define %AX since X86DAGToDAGISel::Select() sometimes uses it
instead of %AL/%AH.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97006
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Feb 2010 23:47:34 +0000 (23:47 +0000)]
fix X86/uint_to_fp-2.ll, only fold loads when they have a
single use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97003
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Feb 2010 23:01:35 +0000 (23:01 +0000)]
make selectnodeto set the nodeid to -1. This makes it more akin to
creating a new node then replacing uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97000
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 23 Feb 2010 22:44:02 +0000 (22:44 +0000)]
Remember to handle sub-registers when moving imp-defs to a rematted instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96995
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 23 Feb 2010 22:43:58 +0000 (22:43 +0000)]
Keep track of phi join registers explicitly in LiveVariables.
Previously, LiveIntervalAnalysis would infer phi joins by looking for multiply
defined registers. That doesn't work if the phi join is implicitly defined in
all but one of the predecessors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96994
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 23 Feb 2010 21:51:54 +0000 (21:51 +0000)]
Fix rev 96389 by restricting the xform to mask that's either signbit or max signed value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96990
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 23 Feb 2010 21:41:24 +0000 (21:41 +0000)]
This is the second patch to allow x86 code to be aligned with optimal nops.
With the compiler changed to use EmitCodeAlignment() it does change the
functionality. But X86 assembly code assembled with llvm-mc does not change
its output. For that we will eventually change the assembler frontend to
detect a '.align x, 0x90' when used in a section that 'hasInstructions' and use
EmitCodeAlignment, but will wait until we have better target hooks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96988
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 23 Feb 2010 21:08:11 +0000 (21:08 +0000)]
Don't mark call instruction as a barrier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96983
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Tue, 23 Feb 2010 20:53:37 +0000 (20:53 +0000)]
Roll back r96959 again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96981
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Tue, 23 Feb 2010 20:51:23 +0000 (20:51 +0000)]
Added for disassembly VLD1 (multiple single elements) which loads memory into
three or four registers and VLD2 (multiple two-element structures) which loads
memory into two double-spaced registers.
A8.6.307 & A8.6.310
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96980
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolas Geoffray [Tue, 23 Feb 2010 19:42:44 +0000 (19:42 +0000)]
Use the module's context instead of the global context.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96977
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 23 Feb 2010 19:37:40 +0000 (19:37 +0000)]
new test case for r96974.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96975
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Feb 2010 19:33:11 +0000 (19:33 +0000)]
no need to override IsLegalToFold, the base implementation
disables load folding at -O0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96973
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Feb 2010 19:32:27 +0000 (19:32 +0000)]
fix a bug in findNonImmUse (used by IsLegalToFold) where nodes with
no id's would cause early exit allowing IsLegalToFold to return true
instead of false, producing a cyclic dag.
This was striking the new isel because it isn't using SelectNodeTo yet,
which theoretically is just an optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96972
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Feb 2010 19:31:18 +0000 (19:31 +0000)]
Print node ID's in dumps and views if set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96971
91177308-0d34-0410-b5e6-
96231b3b80d8
Wesley Peck [Tue, 23 Feb 2010 19:15:24 +0000 (19:15 +0000)]
Adding the MicroBlaze backend.
The MicroBlaze is a highly configurable 32-bit soft-microprocessor for
use on Xilinx FPGAs. For more information see:
http://www.xilinx.com/tools/microblaze.htm
http://en.wikipedia.org/wiki/MicroBlaze
The current LLVM MicroBlaze backend generates assembly which can be
compiled using the an appropriate binutils assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96969
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Feb 2010 18:46:22 +0000 (18:46 +0000)]
use OutStreamer.EmitCodeAlignment for alignment in the text
segment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96967
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 23 Feb 2010 18:44:31 +0000 (18:44 +0000)]
genericize MCAsmStreamer::EmitCodeAlignment to support other targets
so that it doesn't break them when the code generator starts using it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96966
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Tue, 23 Feb 2010 18:40:48 +0000 (18:40 +0000)]
Oops. Pass -lgcc _only_ on ARM, not on everything except ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96965
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 23 Feb 2010 18:29:49 +0000 (18:29 +0000)]
ECALLF, ECALLT shouldn't be marked as barriers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96964
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Tue, 23 Feb 2010 18:26:34 +0000 (18:26 +0000)]
This is the first patch to put the needed bits in place to eventually allow code
to be aligned with optimal nops. This patch does not change any functionality
and when the compiler is changed to use EmitCodeAlignment() it should also not
change the resulting output. Once the compiler change is made and everything
looks good the next patch with the table of optimal X86 nops will be added to
WriteNopData() changing the output. There are many FIXMEs in this patch which
will be removed when we have better target hooks (coming soon I hear).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96963
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 23 Feb 2010 18:13:38 +0000 (18:13 +0000)]
Mark unconditional branches as barriers. Found using -verify-machineinstrs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96960
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Tue, 23 Feb 2010 18:10:07 +0000 (18:10 +0000)]
Roll r96559 forward again, adding libLLVM-2.7svn.so to LLVM. This links 3 of
the examples shared to make sure the shared library keeps working.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96959
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Tue, 23 Feb 2010 17:37:50 +0000 (17:37 +0000)]
Speed up cycle checking significantly by caching results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96956
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 23 Feb 2010 17:17:57 +0000 (17:17 +0000)]
Don't do (X != Y) ? X : Y -> X for floating-point values; it doesn't
handle NaN properly.
Do (X une Y) ? X : Y -> X if one of X and Y is not zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96955
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 23 Feb 2010 17:16:27 +0000 (17:16 +0000)]
Spelling. s/suppor /support /
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96954
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 23 Feb 2010 16:35:41 +0000 (16:35 +0000)]
Remove the code which constant-folded ptrtoint(inttoptr(x)+c) to
getelementptr. Despite only doing so in the case where x is a known
array object and c can be converted to an index within range, this
could still be invalid if c is actually the address of an object
allocated outside of LLVM. Also, SCEVExpander, the original motivation
for this code, has since been improved to avoid inttoptr+ptroint in
more cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96950
91177308-0d34-0410-b5e6-
96231b3b80d8
Garrison Venn [Tue, 23 Feb 2010 16:27:59 +0000 (16:27 +0000)]
Modified examples Makefile to only build the ExceptionDemo example for
x86 and x86_64 on UNIX systems. Only OS X 10.6.2 (x86_64) and 32bit CentOS 5.2
with gcc 4.1.2 were tested. ARM UNIX build triggered failure motivating this
modification, as it seems that the ARM ABI does not support _Unwind_GetIP(...),
_Unwind_SetGR(...), and _Unwind_SetIP(...). From doing a quick browse of:
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf,
it seems as if all other exception related apis are supported. Looks like
the port can be done to ARM. Thanks to Xerxes RĂ„nby <xerxes@zafena.se> for
pointing out this error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96949
91177308-0d34-0410-b5e6-
96231b3b80d8
Wesley Peck [Tue, 23 Feb 2010 15:11:17 +0000 (15:11 +0000)]
Testing subversion commit access
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96948
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Tue, 23 Feb 2010 14:29:42 +0000 (14:29 +0000)]
Fix -mtune forwarding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96944
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 23 Feb 2010 14:17:20 +0000 (14:17 +0000)]
Remove unused lowering function LowerJumpTable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96943
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 23 Feb 2010 13:25:07 +0000 (13:25 +0000)]
Lower BR_JT on the XCore to a jump into a series of jump instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96942
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 23 Feb 2010 11:34:12 +0000 (11:34 +0000)]
tests: Don't make a missing llvm-gcc dir a fatal error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96938
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 23 Feb 2010 10:28:06 +0000 (10:28 +0000)]
Switch .bc/.ll Makefile rules to use LLVM{CC,CXX} instead of LLVMG{CC,XX}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96936
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 23 Feb 2010 10:00:53 +0000 (10:00 +0000)]
Add LLVM{CC,CXX} make variables, which specify the configured path the LLVM
capable compilers (which could be llvm-gcc or clang).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96935
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 23 Feb 2010 10:00:49 +0000 (10:00 +0000)]
Initial configure support for using Clang as the LLVM capable compiler.
Comes in two parts:
1. Use --with-clang=path/to/clang/compiler to select an installed clang, or
--with-built-clang to have the makefiles use the clang which will be built
as the LLVM capable compiler. If neither is given, --with-built-clang will
be used if the Clang sources are checked out into the standard location
(tools/clang).
2. Use --with-llvmcc={llvm-gcc,clang,none} to specify which LLVM capable
compiler to use. If not given, then llvm-gcc will be used if available,
otherwise Clang.
Makefile support still to come.
Eric, Doug, Chris, seem reasonable?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96934
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Tue, 23 Feb 2010 09:59:30 +0000 (09:59 +0000)]
Update mcc16 and the ancient Clang plugin for the 'cmd_line' -> 'command' change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96933
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 23 Feb 2010 09:28:50 +0000 (09:28 +0000)]
Eliminate CFERuntimeLibDir make variable, this shouldn't be needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96932
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 23 Feb 2010 09:28:48 +0000 (09:28 +0000)]
Fix a thinko in the lit.cfg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96931
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Tue, 23 Feb 2010 09:05:21 +0000 (09:05 +0000)]
Input files with empty suffixes must be passed to linker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96927
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Tue, 23 Feb 2010 09:05:15 +0000 (09:05 +0000)]
Support -Xlinker et al.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96926
91177308-0d34-0410-b5e6-
96231b3b80d8