Chris Lattner [Sat, 19 Jun 2004 20:04:47 +0000 (20:04 +0000)]
Print out immediate dominators in program order, not in random order based on the address
of BasicBlock objects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14252
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Jun 2004 19:01:26 +0000 (19:01 +0000)]
This will hopefully fix a heisenbug that Vladimir Merzliakov is running
into valiantly trying to compile stuff on freebsd.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14251
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 19 Jun 2004 18:24:05 +0000 (18:24 +0000)]
Add a note about GCC 3.3.2 optimization bug that causes llc to spin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14250
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Jun 2004 18:15:50 +0000 (18:15 +0000)]
Fix a nasty bug, noticed by Reid
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14249
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Jun 2004 08:56:43 +0000 (08:56 +0000)]
Fix one source of nondeterminism in the -licm pass: the hoist pass
was processing blocks in whatever order they happened to end up in the
dominator tree data structure. Force an ordering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14248
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Jun 2004 08:42:40 +0000 (08:42 +0000)]
Change to use the StableBasicBlockNumbering class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14247
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Jun 2004 08:41:59 +0000 (08:41 +0000)]
Initial checkin of the StableBasicBlockNumbering, a little helper class for computing
(strangely enough) a stable (determinstic) numbering for basic blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14246
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Jun 2004 08:05:58 +0000 (08:05 +0000)]
Fix a tiny bug in the -no-aa pass, in which it did not ever get a target data.
This is a regression from 1.2, though noone uses -no-aa anyway
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14245
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Jun 2004 07:40:14 +0000 (07:40 +0000)]
Do not let the numbering of PHI nodes placed in the function depend on
non-deterministic things like the ordering of blocks in the dominance
frontier of a BB. Unfortunately, I don't know of a better way to solve
this problem than to explicitly sort the BB's in function-order before
processing them. This is guaranteed to slow the pass down a bit, but
is absolutely necessary to get usable diffs between two different tools
executing the mem2reg or scalarrepl pass.
Before this, bazillions of spurious diff failures occurred all over the
place due to the different order of processing PHIs:
- %tmp.111 = getelementptr %struct.Connector_struct* %upcon.0.0, uint 0, uint 0
+ %tmp.111 = getelementptr %struct.Connector_struct* %upcon.0.1, uint 0, uint 0
Now, the diffs match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14244
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Jun 2004 07:02:14 +0000 (07:02 +0000)]
Do not sort by the address of LLVM ConstantInt* objects. This produces
nondeterministic results that depend on where these objects land in memory.
Instead, sort by the value of the constant, which is stable.
Before this patch, the -simplifycfg pass run from two different compilers
could cause different code to be generated, though it was semantically the
same:
@@ -12258,8 +12258,8 @@
%s_addr.1 = phi sbyte* [ %s, %entry ], [ %inc.0, %no_exit ] ; <sbyte*> [#uses=5]
%tmp.1 = load sbyte* %s_addr.1 ; <sbyte> [#uses=1]
switch sbyte %tmp.1, label %no_exit [
- sbyte 0, label %loopexit
sbyte 46, label %loopexit
+ sbyte 0, label %loopexit
]
We need to stomp all of this stuff out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14243
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Jun 2004 02:02:22 +0000 (02:02 +0000)]
Do not loop over uses as we delete them. This causes iterators to be
invalidated out from under us. This bug goes back to revision 1.1: scary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14242
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Jun 2004 01:11:02 +0000 (01:11 +0000)]
Bug fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14241
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 19 Jun 2004 01:08:12 +0000 (01:08 +0000)]
Test for PR374
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14240
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 18 Jun 2004 20:18:31 +0000 (20:18 +0000)]
Fix relative link to the CVS mirrors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14239
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Jun 2004 20:15:58 +0000 (20:15 +0000)]
Add link to the CVS mirror hosted by Reid
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14238
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 18 Jun 2004 18:39:00 +0000 (18:39 +0000)]
Add link documenting shared/static library differences across platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14237
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Jun 2004 17:57:29 +0000 (17:57 +0000)]
Bug fixed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14236
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 18 Jun 2004 15:54:54 +0000 (15:54 +0000)]
Capitalize Cygwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14235
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 18 Jun 2004 15:38:49 +0000 (15:38 +0000)]
* Fix file header and name
* Order #includes alphabetically
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14234
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 18 Jun 2004 15:34:07 +0000 (15:34 +0000)]
Use the machine-independent method of querying the page size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14233
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 18 Jun 2004 15:30:25 +0000 (15:30 +0000)]
Add a target-independent way to query page size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14232
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 18 Jun 2004 08:59:16 +0000 (08:59 +0000)]
.zero doesn't work in the Solaris assembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14231
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 18 Jun 2004 08:46:15 +0000 (08:46 +0000)]
Get rid of selects the easy way
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14230
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 18 Jun 2004 08:45:52 +0000 (08:45 +0000)]
Make visitAllocaInst() look more like its X86 counterpart.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14229
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 18 Jun 2004 08:19:08 +0000 (08:19 +0000)]
Mess around with allocation order. In particular, I think we ought to be
using the local & in regs first because they are not clobbered by calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14228
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 18 Jun 2004 08:18:54 +0000 (08:18 +0000)]
JMPL has a delay slot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14227
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 18 Jun 2004 06:28:21 +0000 (06:28 +0000)]
Clean up the commented-out F3_3 stuff.
Replace it with a working class for FP instrs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14226
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 18 Jun 2004 06:28:10 +0000 (06:28 +0000)]
Fix jmpl.
Add some FP moves.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14225
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 18 Jun 2004 06:27:59 +0000 (06:27 +0000)]
Support printing base+offset pairs where the offset is a register.
Use this for printing the jmpl indirect-call instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14224
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 18 Jun 2004 06:27:48 +0000 (06:27 +0000)]
Support intrinsic calls (although no particular intrinsics are supported yet).
Support indirect calls.
Support returning a float value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14223
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Jun 2004 06:26:29 +0000 (06:26 +0000)]
Calls to __builtin_isunordered and friends no longer cause llvmgcc to ICE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14222
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Jun 2004 06:07:51 +0000 (06:07 +0000)]
Implement Transforms/InstCombine/and.ll:test17, a common case that
occurs due to unordered comparison macros in math.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14221
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Jun 2004 06:07:17 +0000 (06:07 +0000)]
New test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14220
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Jun 2004 05:50:48 +0000 (05:50 +0000)]
Do not function resolve intrinsics. This prevents warnings and possible bad
things from happening due to
declare bool %llvm.isunordered(double, double)
declare bool %llvm.isunordered(float, float)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14219
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Jun 2004 05:42:50 +0000 (05:42 +0000)]
Test that C99 unordered comparison functions are not being turned into libc calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14218
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 18 Jun 2004 05:19:27 +0000 (05:19 +0000)]
Add load instructions for floating-point registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14217
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 18 Jun 2004 05:19:16 +0000 (05:19 +0000)]
Support alloca instructions.
Support copying floating-point constants to registers.
Add assertion to visitCallInst to abort if we hit a NULL calledFunction, for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14216
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Jun 2004 04:07:20 +0000 (04:07 +0000)]
Fix printing of Argument objects, problem found by Patrick Meredith
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14215
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Jun 2004 03:39:56 +0000 (03:39 +0000)]
New testcase for GCC unordered comparison builtins
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14214
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Jun 2004 00:50:37 +0000 (00:50 +0000)]
Codegen sub C, X a little bit better for register pressure. Instead of
mov REG, C
sub REG, X
generate:
neg X
add X, C
which uses one less reg
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14213
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Jun 2004 00:29:22 +0000 (00:29 +0000)]
Fold setcc instructions into select and branches that are not in the same BB as
the setcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14212
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Thu, 17 Jun 2004 22:34:48 +0000 (22:34 +0000)]
Make storeRegToStackSlot slightly shorter.
Make copyRegToReg return 1 instead of -1.
Edit a comment in emitPrologue().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14211
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Thu, 17 Jun 2004 22:34:29 +0000 (22:34 +0000)]
Set the isBranch and isTerminator flags on branch instructions correctly.
Add a FIXME about the (currently unused) JMPL instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14210
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Thu, 17 Jun 2004 22:34:19 +0000 (22:34 +0000)]
Emit stores correctly; don't fail an assertion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14209
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Thu, 17 Jun 2004 22:34:08 +0000 (22:34 +0000)]
Support generating machine instructions for Phi nodes (based on x86, but with
modifications for 1 LLVM BB --> many MBBs).
Fix store operand order: make it always be Base, Offset, SrcReg (think
"[ Base + Offset ] = SrcReg").
Rewrite visitBranchInst() to be even dumber (but working) -- give up on
the branch fallthrough trick, for the time being.
Make visitSetCondInst() work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14208
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Thu, 17 Jun 2004 22:33:57 +0000 (22:33 +0000)]
Recognize more branches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14207
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Thu, 17 Jun 2004 22:27:04 +0000 (22:27 +0000)]
I love the smell of a freshly broken PowerPC build in the morning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14206
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Thu, 17 Jun 2004 22:26:53 +0000 (22:26 +0000)]
Make debugging dumps w/ multiple MachineBBs for a given LLVM BB readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14205
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Jun 2004 22:15:25 +0000 (22:15 +0000)]
Do not fold loads into instructions if it is used more than once. In particular
we do not want to fold the load in cases like this:
X = load
= add A, X
= add B, X
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14204
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Jun 2004 21:20:52 +0000 (21:20 +0000)]
Fix compilation problem on freebsd. Problem noted by Vladimir Merzliakov in
PR371
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14203
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Thu, 17 Jun 2004 19:39:23 +0000 (19:39 +0000)]
Use addGlobalAddress and addMBB for call & branch targets instead of addPCDisp.
Abort if we see a PCRelativeDisp MachineOperand, to be safe. This matches
the X86 backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14202
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Jun 2004 18:19:28 +0000 (18:19 +0000)]
Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14201
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Jun 2004 18:16:02 +0000 (18:16 +0000)]
Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
Delete two functions that are now methods on the Type class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14200
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Jun 2004 17:56:54 +0000 (17:56 +0000)]
Minor cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14199
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 17 Jun 2004 15:49:36 +0000 (15:49 +0000)]
Make header comment fit within 80 cols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14198
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 17 Jun 2004 15:39:58 +0000 (15:39 +0000)]
Since the Great LLVM Tool Renaming(tm), we no longer have collisions between our
assembler/linker and the system equivalents.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14197
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Thu, 17 Jun 2004 07:26:52 +0000 (07:26 +0000)]
Fix typo in DEBUG printout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14196
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Jun 2004 06:57:29 +0000 (06:57 +0000)]
Fix a recent regression in Applications/sgefa that Alkis pointed out to me.
The vector may actually be empty if the register that we are marking as
recently used is not actually allocatable. This happens for physical registers
that are not allocatable, like the ST(x) registers on X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14195
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Wed, 16 Jun 2004 02:56:40 +0000 (02:56 +0000)]
Add int ferror(FILE *)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14194
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Wed, 16 Jun 2004 00:26:45 +0000 (00:26 +0000)]
I'm afraid this doesn't exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14193
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 15 Jun 2004 23:09:50 +0000 (23:09 +0000)]
Um, did someone make a typo or something?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14192
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Jun 2004 21:52:58 +0000 (21:52 +0000)]
isnan is dead
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14191
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Jun 2004 21:50:46 +0000 (21:50 +0000)]
llvm.isnan is dead, long live llvm.isunordered!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14190
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Jun 2004 21:48:07 +0000 (21:48 +0000)]
Remove support for llvm.isnan. Alkis wins :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14189
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Jun 2004 21:46:16 +0000 (21:46 +0000)]
This testcase is a bit silly now, but oh well :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14188
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Jun 2004 21:42:23 +0000 (21:42 +0000)]
Remove isnan support, correct isunordered support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14187
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Jun 2004 21:37:54 +0000 (21:37 +0000)]
Remove support for the isnan intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14186
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Jun 2004 21:36:44 +0000 (21:36 +0000)]
Add basic support for the isunordered intrinsic. The isnan stuff still needs to go
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14185
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Jun 2004 21:29:40 +0000 (21:29 +0000)]
Right, stop being silly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14184
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Jun 2004 21:29:01 +0000 (21:29 +0000)]
Add a nan, stop testing isnan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14183
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 15 Jun 2004 21:09:46 +0000 (21:09 +0000)]
Fix thinko in visitor... ShiftInsts should currently be delegated
to visitBinaryOperator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14182
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Jun 2004 21:07:32 +0000 (21:07 +0000)]
Do not dereference end iterators. It's really bad for the asmwriter's health.
This possibly fixes PR370
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14181
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 15 Jun 2004 20:37:12 +0000 (20:37 +0000)]
I think we'll use the standard lowering passes for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14179
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 15 Jun 2004 20:06:32 +0000 (20:06 +0000)]
Fix bug generating code for void call instructions: don't call
getReg() on void value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14178
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 15 Jun 2004 19:53:10 +0000 (19:53 +0000)]
Squash a warning from the Solaris assembler by aligning the stack
on a double-word boundary instead of a single-word boundary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14177
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 15 Jun 2004 19:52:59 +0000 (19:52 +0000)]
Allow special-casing of operand printing based on opcode. Print
non-register, non-immed. arguments to SETHI and OR using %hi() and
%lo() respectively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14176
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Tue, 15 Jun 2004 19:16:07 +0000 (19:16 +0000)]
Support constant GEP expressions.
Support copying long constants to register pairs.
Support copying ConstantPointerNulls and ConstantPointerRefs to registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14175
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 14 Jun 2004 16:30:05 +0000 (16:30 +0000)]
The correct prototype is `int atoi(CONST char*)'. Unbroke AIX build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14173
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Mon, 14 Jun 2004 15:13:59 +0000 (15:13 +0000)]
Add file comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14172
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Mon, 14 Jun 2004 06:33:19 +0000 (06:33 +0000)]
Quick hack to get this file compiling again on Mac OS X. The right thing to do
is write an autoconf macro that checks whether __isnan or isnan actually works
**using the C++ compiler after #include <cmath>**, instead of doing it the easy
way with AC_CHECK_FUNCS().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14171
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Mon, 14 Jun 2004 05:05:45 +0000 (05:05 +0000)]
Make -print-machineinstrs even stronger. You get to see the final code after
peepholing, and make it work the same way in the JIT as in LLC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14170
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 13 Jun 2004 19:17:49 +0000 (19:17 +0000)]
Get rid of "might be uninitialized" warnings when compiling with GCC 3.3.2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14169
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Sun, 13 Jun 2004 01:23:56 +0000 (01:23 +0000)]
Add constant folding capabilities to the isunordered intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14168
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Sun, 13 Jun 2004 01:16:15 +0000 (01:16 +0000)]
Really add the docs this time :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14167
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Sun, 13 Jun 2004 00:55:26 +0000 (00:55 +0000)]
Make assertions more consistent with the rest of the intrinsic
function verification and make it a requirement that both arguments to
llvm.isunordered are of the same type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14165
91177308-0d34-0410-b5e6-
96231b3b80d8
Alkis Evlogimenos [Sat, 12 Jun 2004 19:19:14 +0000 (19:19 +0000)]
Add the isunordered intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14159
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 12 Jun 2004 14:46:02 +0000 (14:46 +0000)]
Reduce the number of columns in the alpha index to 4 so that it fits
on a 1280x1024 screen!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14158
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jun 2004 21:12:22 +0000 (21:12 +0000)]
It is no longer 2001
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14157
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gaeke [Fri, 11 Jun 2004 19:55:30 +0000 (19:55 +0000)]
Don't trim @PrevDays (causing an error) if it isn't long enough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14156
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Fri, 11 Jun 2004 16:50:21 +0000 (16:50 +0000)]
Fix grammar: 's is for possessive only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14155
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 11 Jun 2004 15:10:38 +0000 (15:10 +0000)]
Implement tracking of bytecode instruction size and the number of long
instructions generated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14154
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Fri, 11 Jun 2004 07:06:22 +0000 (07:06 +0000)]
Add two options to the program:
-release causes ENABLE_OPTIMIZED=1 to be added to the make line so that
the test runs against optimized code.
-pedantic causes the CompileOptimizeOpts variable to be overridden to
add several additional warnings not picked up by -Wall. This
should help catch additional programming faux pas. See the diff
for the specific details.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14153
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jun 2004 06:37:11 +0000 (06:37 +0000)]
Fix fallout from getOffsetOfLocalArea() being negated. Debugging dumps were being
printed incorrectly, and we were reserving 8 extra bytes of stack space for functions
on X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14152
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jun 2004 06:17:13 +0000 (06:17 +0000)]
llvm.isnan doesn't access memory
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14151
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jun 2004 06:16:23 +0000 (06:16 +0000)]
Constant fold the isnan intrinsic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14150
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jun 2004 06:16:13 +0000 (06:16 +0000)]
Add tests for isnan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14149
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jun 2004 05:33:49 +0000 (05:33 +0000)]
By far, one of the most common uses of isnan is to make 'isunordered'
comparisons. In an 'isunordered' predicate, which looks like this at
the LLVM level:
%a = call bool %llvm.isnan(double %X)
%b = call bool %llvm.isnan(double %Y)
%COM = or bool %a, %b
We used to generate this code:
fxch %ST(1)
fucomip %ST(0), %ST(0)
setp %AL
fucomip %ST(0), %ST(0)
setp %AH
or %AL, %AH
With this patch, we generate this code:
fucomip %ST(0), %ST(1)
fstp %ST(0)
setp %AL
Which should make alkis happy. Tested as X86/compare_folding.llx:test1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14148
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jun 2004 05:30:34 +0000 (05:30 +0000)]
Test that the X86 backend is only emitting one fucom instruction
for each 'COM =' line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14147
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jun 2004 05:22:44 +0000 (05:22 +0000)]
Fix bug in previous checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14146
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 11 Jun 2004 04:50:14 +0000 (04:50 +0000)]
No really, these are dead now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14145
91177308-0d34-0410-b5e6-
96231b3b80d8