Andrew Lenharth
94150f0666
maintaining stackpointer alignment. Perhaps it doesn't matter
...
llvm-svn: 25592
2006-01-25 01:51:08 +00:00
Andrew Lenharth
1dbc389ad2
fix build on 64 bit hosts
...
llvm-svn: 25591
2006-01-24 21:26:43 +00:00
Chris Lattner
c0f633a598
Fix Regression/Transforms/ScalarRepl/2006-01-24-IllegalUnionPromoteCrash.ll
...
llvm-svn: 25587
2006-01-24 19:36:27 +00:00
Chris Lattner
27d30a5f42
use ESP directly, not a copy of ESP into some other register for fastcc calls
...
llvm-svn: 25584
2006-01-24 06:14:44 +00:00
Chris Lattner
f9a1e3aadc
Fix an infinite loop I caused by making sure to legalize the flag operand
...
of CALLSEQ_* nodes
llvm-svn: 25582
2006-01-24 05:48:21 +00:00
Chris Lattner
6f33eaeb81
Emit the copies out of call return registers *after* the ISD::CALLSEQ_END
...
node, fixing fastcc and the case where a function has a frame pointer due
to dynamic allocas.
llvm-svn: 25580
2006-01-24 05:17:12 +00:00
Chris Lattner
68e62a5184
Allow jit-beta to work
...
llvm-svn: 25578
2006-01-24 04:50:48 +00:00
Jeff Cohen
12f8441c03
Fix VC++ compilation error.
...
llvm-svn: 25577
2006-01-24 04:43:17 +00:00
Jeff Cohen
b56a80061a
Remove unused variables.
...
llvm-svn: 25576
2006-01-24 04:42:53 +00:00
Chris Lattner
00fcdfef0d
rename method
...
llvm-svn: 25572
2006-01-24 04:16:34 +00:00
Chris Lattner
8ebd2164eb
Rename method
...
llvm-svn: 25571
2006-01-24 04:14:29 +00:00
Chris Lattner
eef2fe72c0
Initial checkin of the InlineAsm class
...
llvm-svn: 25570
2006-01-24 04:13:11 +00:00
Jim Laskey
3e65f28ffe
Crude Dwarf global variable debugging.
...
llvm-svn: 25569
2006-01-24 00:49:18 +00:00
Chris Lattner
efaf35d52a
Pretty print file-scope asm blocks.
...
llvm-svn: 25568
2006-01-24 00:45:30 +00:00
Chris Lattner
3acaf5cb11
syntax change
...
llvm-svn: 25567
2006-01-24 00:40:17 +00:00
Chris Lattner
e3a79268a2
Print file-scope inline asm blocks at the start of the output file.
...
llvm-svn: 25565
2006-01-23 23:47:53 +00:00
Chris Lattner
bc7b2581cb
Add support for reading/writing inline asm
...
llvm-svn: 25564
2006-01-23 23:43:17 +00:00
Chris Lattner
dd2d3faf19
Add support for linking inline asm
...
llvm-svn: 25560
2006-01-23 23:08:37 +00:00
Chris Lattner
37992b34c2
When cloning a module, clone the inline asm.
...
llvm-svn: 25559
2006-01-23 23:06:28 +00:00
Chris Lattner
edd9b0389b
regenerate
...
llvm-svn: 25558
2006-01-23 23:05:42 +00:00
Chris Lattner
f09741f441
Add support for parsing global asm blocks
...
llvm-svn: 25557
2006-01-23 23:05:15 +00:00
Chris Lattner
6ed87bdeb4
Print out inline asm strings
...
llvm-svn: 25556
2006-01-23 23:03:36 +00:00
Andrew Lenharth
c0bf377f98
bye bye Pattern ISEL
...
llvm-svn: 25553
2006-01-23 21:56:07 +00:00
Andrew Lenharth
fef7dec9cc
added stores to lsmark
...
llvm-svn: 25552
2006-01-23 21:51:33 +00:00
Andrew Lenharth
683352382e
another couple selects
...
llvm-svn: 25551
2006-01-23 21:51:14 +00:00
Andrew Lenharth
208bbe9ca9
fix up more lsmark stuff
...
llvm-svn: 25550
2006-01-23 21:23:26 +00:00
Andrew Lenharth
ba97ea52d4
yea, lowering this stuff will basically work
...
llvm-svn: 25549
2006-01-23 20:59:50 +00:00
Andrew Lenharth
c28563874c
another selectto
...
llvm-svn: 25548
2006-01-23 20:59:12 +00:00
Jim Laskey
b8566fa10a
Typo.
...
llvm-svn: 25545
2006-01-23 13:34:04 +00:00
Evan Cheng
31272347d4
Skeleton of the list schedule.
...
llvm-svn: 25544
2006-01-23 08:26:10 +00:00
Evan Cheng
421cfe8006
Minor clean up.
...
llvm-svn: 25543
2006-01-23 08:25:34 +00:00
Reid Spencer
455d1217ea
Revert last patch because it messes up the JIT, amongst other things.
...
llvm-svn: 25541
2006-01-23 08:11:03 +00:00
Reid Spencer
281dcd6ace
For PR411:
...
No functionality changes, just improve the code by a) providing better
function names, b) eliminating a call to get_suffix and c) tightening up
a function elimination test to reduce further checking.
llvm-svn: 25540
2006-01-23 07:42:30 +00:00
Reid Spencer
95c05bf1b4
For PR411:
...
Don't try to be smart about fixing intrinsic functions when they're read
in, just fix them after the module is read when all names are resolved.
llvm-svn: 25539
2006-01-23 07:39:03 +00:00
Chris Lattner
763dfd7723
Fix Regression/CodeGen/SparcV8/2006-01-22-BitConvertLegalize.ll by making
...
sure that the result of expanding a BIT_CONVERT node is itself legalized.
llvm-svn: 25538
2006-01-23 07:30:46 +00:00
Evan Cheng
87063b9986
Remove a couple of unnecessary #include's
...
llvm-svn: 25535
2006-01-23 07:21:01 +00:00
Chris Lattner
8935e3eb7d
remove the V8 simple isel
...
llvm-svn: 25534
2006-01-23 07:20:15 +00:00
Evan Cheng
c1e1d9724d
Factor out more instruction scheduler code to the base class.
...
llvm-svn: 25532
2006-01-23 07:01:07 +00:00
Chris Lattner
5774040c09
add a bunch more optimizations for unary double math functions
...
llvm-svn: 25530
2006-01-23 06:24:46 +00:00
Duraid Madina
37c8ad14f4
die, die!! r15, you are not callee-saved
...
llvm-svn: 25527
2006-01-23 06:11:45 +00:00
Duraid Madina
cc87402925
fix register corruption! (my god.) r15 is a scratch reg, using that as
...
a frame pointer is a pretty doofus thing to do. use r5 instead, and
mark it callee-saved, coz that's what it is!
llvm-svn: 25526
2006-01-23 06:08:46 +00:00
Chris Lattner
57a2863cbb
Refactor/genericize this, no functionality change
...
llvm-svn: 25525
2006-01-23 05:57:36 +00:00
Chris Lattner
deda32a786
Fix bugs lowering stackrestore, fixing 2004-08-12-InlinerAndAllocas.c on
...
PPC.
llvm-svn: 25522
2006-01-23 05:22:07 +00:00
Chris Lattner
c66da83a89
Speedup and simplify pass registration by the observation that there is
...
exactly one PassInfo object per RegisterPass object and that their lifetimes
are the same. As such, there is no reason for the RegisterPass object to
dynamically allocate the PassInfo object at compiler startup time: just inline
the object by-value. This should reduce codesize, heap size, and startup time. Yaay.
llvm-svn: 25521
2006-01-23 01:01:04 +00:00
Chris Lattner
01a325ed68
Add #include of <iostream>
...
llvm-svn: 25516
2006-01-22 23:41:42 +00:00
Chris Lattner
de02d7727f
Add explicit #includes of <iostream>
...
llvm-svn: 25515
2006-01-22 23:41:00 +00:00
Chris Lattner
c597b8a55e
Make iostream #inclusion explicit
...
llvm-svn: 25514
2006-01-22 23:32:06 +00:00
Chris Lattner
6806c02380
Add explicit iostream #includes
...
llvm-svn: 25513
2006-01-22 23:19:18 +00:00
Chris Lattner
33081b4648
Make this more efficient in the following ways:
...
1. Do not statically construct a map when the program starts up, this
is expensive and cannot be optimized. Instead, create a list.
2. Do not insert entries for all function in the module into a hashmap
that lives the full life of the compiler.
llvm-svn: 25512
2006-01-22 23:10:26 +00:00
Chris Lattner
469640e506
Add explicit #includes of <iostream>
...
llvm-svn: 25509
2006-01-22 22:53:01 +00:00
Chris Lattner
0d4ebfc15b
Several non-functionality changing changes:
...
1. Use the varargs version of getOrInsertFunction to simplify code.
2. remove #include
3. Reduce the number of #ifdef's.
4. remove extraneous vertical whitespace.
llvm-svn: 25508
2006-01-22 22:35:08 +00:00
Chris Lattner
e23928c67f
Fix a bug in a recent refactor that caused a bunch of programs to miscompile
...
or the compiler to crash.
llvm-svn: 25503
2006-01-21 19:12:11 +00:00
Duraid Madina
4204e02fc6
insignificant, but next up is proper stack frame layout!
...
llvm-svn: 25497
2006-01-21 14:27:19 +00:00
Chris Lattner
44cab00045
Fix CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll
...
llvm-svn: 25496
2006-01-21 04:27:00 +00:00
Evan Cheng
468fecdc99
Rename fcmovae to fcmovnb and fcmova to fcmovnbe (following Intel manual).
...
Some assemblers can't recognize the aliases.
llvm-svn: 25494
2006-01-21 02:55:41 +00:00
Evan Cheng
739a6a456e
Do some code refactoring on Jim's scheduler in preparation of the new list
...
scheduler.
llvm-svn: 25493
2006-01-21 02:32:06 +00:00
Chris Lattner
9436aa74a9
trivial formatting improvement: don't insert extra blank lines between .comm
...
vars.
llvm-svn: 25492
2006-01-21 01:35:26 +00:00
Jim Laskey
3d8f3a55b7
Simplify search for abbreviations.
...
llvm-svn: 25491
2006-01-21 01:13:18 +00:00
Jim Laskey
45900baadb
Correct some simple errors.
...
llvm-svn: 25490
2006-01-21 00:59:54 +00:00
Jim Laskey
b17434dc1d
Right size integer values before emitting.
...
llvm-svn: 25489
2006-01-20 21:02:36 +00:00
Robert Bocchino
4b41c8e929
Make the C writer work with packed types. printContainedStructs is
...
still not quite right and will be fixed later.
llvm-svn: 25488
2006-01-20 20:43:57 +00:00
Jim Laskey
7a3e9aa282
Reworked how Dwarf debug info entries and abbreviations are handled. Added
...
pubnames and debuy str sections.
llvm-svn: 25487
2006-01-20 20:34:06 +00:00
Duraid Madina
f54c9395e7
remove RET hack, add proper support for rets (watching out for ret voids)
...
llvm-svn: 25486
2006-01-20 20:24:31 +00:00
Chris Lattner
eca87342b4
Simplify CWriter::printContainedStructs, also allowing it to work with
...
PackedTypes as a side-effect.
llvm-svn: 25485
2006-01-20 18:57:03 +00:00
Chris Lattner
335b46dd20
LowerReturn now doesn't have to handle f32 returns.
...
llvm-svn: 25484
2006-01-20 18:41:25 +00:00
Chris Lattner
15afe462a8
remove some unintentionally committed code
...
llvm-svn: 25483
2006-01-20 18:40:10 +00:00
Chris Lattner
222ceabbee
If the target doesn't support f32 natively, insert the FP_EXTEND in target-indep
...
code, so that the LowerReturn code doesn't have to handle it.
llvm-svn: 25482
2006-01-20 18:38:32 +00:00
Robert Bocchino
69d621387c
Fixed InitializeMemory to handle ConstantPacked.
...
llvm-svn: 25481
2006-01-20 18:18:40 +00:00
Chris Lattner
61590dd739
Remove dead expression.
...
llvm-svn: 25480
2006-01-20 18:04:43 +00:00
Chris Lattner
06784ff9ab
Don't use invalidated use_iterator's. This fixes a crash compiling povray
...
llvm-svn: 25479
2006-01-20 18:01:41 +00:00
Duraid Madina
4026e12e85
fix sext breakage: now we correctly deal with functions that return
...
int vs uint
llvm-svn: 25478
2006-01-20 16:10:05 +00:00
Duraid Madina
9a8fb20689
fix storing bools! eek!
...
llvm-svn: 25476
2006-01-20 03:40:25 +00:00
Evan Cheng
0c5de2864f
Stop doing that accidental commit.
...
llvm-svn: 25474
2006-01-20 01:14:05 +00:00
Evan Cheng
cce748d316
A few more SH{L|R}D peepholes.
...
llvm-svn: 25473
2006-01-20 01:13:30 +00:00
Robert Bocchino
027c18da98
ConstantFoldLoadThroughGEPConstantExpr wasn't handling pointers to
...
packed types correctly.
llvm-svn: 25470
2006-01-19 23:53:23 +00:00
Evan Cheng
9c30bd5e25
Didn't mean to commit the last one.
...
llvm-svn: 25469
2006-01-19 23:27:08 +00:00
Evan Cheng
8591b9f254
Added i16 SH{L|R}D patterns.
...
llvm-svn: 25468
2006-01-19 23:26:24 +00:00
Chris Lattner
93bde9cbf7
add support for ConstantPacked to the linker
...
llvm-svn: 25467
2006-01-19 23:15:58 +00:00
Andrew Lenharth
5df67bcd50
typo
...
llvm-svn: 25464
2006-01-19 21:10:38 +00:00
Andrew Lenharth
688ea707d8
nasty nasty patterns
...
llvm-svn: 25463
2006-01-19 20:49:37 +00:00
Duraid Madina
550d8ec1ad
fix boolean XOR (which fixes up comparisons..)
...
llvm-svn: 25462
2006-01-19 15:18:56 +00:00
Duraid Madina
4d69a01254
BOOM!
...
llvm-svn: 25460
2006-01-19 14:14:11 +00:00
Duraid Madina
bcbcfac6ea
click click
...
llvm-svn: 25459
2006-01-19 14:13:11 +00:00
Evan Cheng
3d2cc7e2e9
Avoid generating a redundant setcc.
...
llvm-svn: 25457
2006-01-19 08:52:46 +00:00
Reid Spencer
ade182125f
For PR696:
...
Don't do floor->floorf conversion if floorf is not available. This checks
the compiler's host, not its target, which is incorrect for cross-compilers
Not sure that's important as we don't build many cross-compilers.
llvm-svn: 25456
2006-01-19 08:36:56 +00:00
Duraid Madina
29b9d7cdff
fix calls that return f32
...
llvm-svn: 25455
2006-01-19 08:31:51 +00:00
Chris Lattner
e154abf9b3
Implement casts.ll:test26: a cast from float -> double -> integer, doesn't
...
need the float->double part.
llvm-svn: 25452
2006-01-19 07:40:22 +00:00
Chris Lattner
2efef3d6f1
implement support for f32 arguments past the first 6 words
...
llvm-svn: 25450
2006-01-19 07:22:29 +00:00
Reid Spencer
bf31906660
1. Identify bytecode modules that have upgraded intrinsics by setting a
...
boolean flag if we read a function prototype that needs upgrading.
2. Don't upgrade the CallInst instruction until after its been inserted
into the basic block, and only if we know that we have seen an
upgraded intrinsic function.
llvm-svn: 25448
2006-01-19 07:02:16 +00:00
Reid Spencer
75b9567671
Don't forget about casting the result of an upgraded call to an intrinsic
...
in the case where it needs to cast back to a signed type.
llvm-svn: 25447
2006-01-19 07:00:29 +00:00
Reid Spencer
7e63a456a0
Add a flag to identify bytecode files that have intrinsic functions that
...
need to be upgraded.
llvm-svn: 25445
2006-01-19 06:57:58 +00:00
Evan Cheng
91007126c2
adc and sbb need an incoming flag to ensure it reads the carry flag
...
from add / sub.
llvm-svn: 25444
2006-01-19 06:53:20 +00:00
Reid Spencer
4cdceb7203
Make get_suffix faster by using a switch on getTypeID rather than a series
...
of comparisons on the various type objects.
llvm-svn: 25441
2006-01-19 05:37:27 +00:00
Evan Cheng
13e8c9d6de
Another typo
...
llvm-svn: 25440
2006-01-19 04:54:52 +00:00
Chris Lattner
c3c27032d0
add a note
...
llvm-svn: 25439
2006-01-19 02:09:38 +00:00
Evan Cheng
a7bfbe996e
Two peepholes:
...
(or (x >> c) | (y << (32 - c))) ==> (shrd x, y, c)
(or (x << c) | (y >> (32 - c))) ==> (shld x, y, c)
llvm-svn: 25438
2006-01-19 01:56:29 +00:00
Evan Cheng
6135a7a546
Didn't mean to check that in.
...
llvm-svn: 25436
2006-01-19 01:52:56 +00:00
Evan Cheng
267ba5965e
A obvious typo
...
llvm-svn: 25435
2006-01-19 01:46:14 +00:00
Reid Spencer
c8a9fafcfc
Make sure intrinsic auto-upgrade is invoked correctly.
...
llvm-svn: 25434
2006-01-19 01:21:04 +00:00
Reid Spencer
f8592bdea5
Don't accept the ctpop, cttz, or ctlz intrinsics with signed arguments. The
...
interface requires unsigned arguments.
llvm-svn: 25433
2006-01-19 01:20:03 +00:00
Reid Spencer
e0aa7c7ded
Add a new interface function to AutoUpgrade for simultaneously upgrading
...
the Function and the CallInst: UpgradeCallsToIntrinsic(Function*). Also,
re-factor the AutoUpgrade implementation to eliminate some duplication of
code.
llvm-svn: 25432
2006-01-19 01:18:29 +00:00
Chris Lattner
7be2203c9f
If not internalizing, don't mark llvm.global[cd]tors const, as a fix for a
...
hypothetical future boog.
llvm-svn: 25430
2006-01-19 00:46:54 +00:00
Chris Lattner
d693b7943a
Don't internalize llvm.global[cd]tor unless there are uses of it. This
...
unbreaks front-ends that don't use __main (like the new CFE).
llvm-svn: 25429
2006-01-19 00:40:39 +00:00
Andrew Lenharth
7599b6e4af
was ignoring the legalized chain in this case, fixed SPASS on alpha
...
llvm-svn: 25428
2006-01-18 23:19:08 +00:00
Nate Begeman
569c439567
Get rid of code in the DAGCombiner that is duplicated in SelectionDAG.cpp
...
Now all constant folding in the code generator is in one place.
llvm-svn: 25426
2006-01-18 22:35:16 +00:00
Chris Lattner
e2ee190821
Temporary work around for a libcall insertion bug: If a target doesn't
...
support FSIN/FCOS nodes, do not lower sin/cos to them.
llvm-svn: 25425
2006-01-18 21:50:14 +00:00
Chris Lattner
b98282d2d6
Make sure that cloning a module clones its target triple and dependent
...
library list as well. This should help bugpoint.
llvm-svn: 25424
2006-01-18 21:32:45 +00:00
Chris Lattner
ce5066c863
Don't assert on 'select_cc SETUO'
...
llvm-svn: 25423
2006-01-18 19:42:35 +00:00
Chris Lattner
36eba3a49b
fix out of date comment
...
llvm-svn: 25422
2006-01-18 19:37:44 +00:00
Chris Lattner
15e7642ab1
Fix Regression/CodeGen/PowerPC/2006-01-18-InvalidBranchOpcodeAssert.ll
...
llvm-svn: 25421
2006-01-18 19:35:21 +00:00
Chris Lattner
5fee908be5
Fix a backwards conditional that caused an inf loop in some cases. This
...
fixes: test/Regression/CodeGen/Generic/2005-01-18-SetUO-InfLoop.ll
llvm-svn: 25419
2006-01-18 19:13:41 +00:00
Jim Laskey
194a5268cb
Added minimum Dwarf aranges. Cleaned up some section headers. Line number
...
support now works in gdb.
llvm-svn: 25417
2006-01-18 16:54:26 +00:00
Evan Cheng
621674a19d
SRA shift amount must be in i8
...
llvm-svn: 25416
2006-01-18 09:26:46 +00:00
Evan Cheng
4b3774e0a2
If a call return type is i1, insert a truncate from X86::AL to i1.
...
llvm-svn: 25415
2006-01-18 08:08:38 +00:00
John Criswell
0e9bd5a416
Fixed style of curly brace. No functionality changes.
...
llvm-svn: 25414
2006-01-17 22:01:57 +00:00
Evan Cheng
feaed4d107
Fix lowering of calls which return f32 values.
...
llvm-svn: 25413
2006-01-17 21:58:21 +00:00
Jim Laskey
cc9dfecf81
Add frame work for additional dwarf sections. Comments will improve as code
...
is added.
llvm-svn: 25410
2006-01-17 20:41:40 +00:00
Robert Bocchino
ca27f0320b
VMCore support for the insertelement operation.
...
llvm-svn: 25408
2006-01-17 20:07:22 +00:00
Robert Bocchino
e6336a9b69
Constant folding support for the insertelement operation.
...
llvm-svn: 25407
2006-01-17 20:07:07 +00:00
Robert Bocchino
6dce25019d
Lowerpacked and SCCP support for the insertelement operation.
...
llvm-svn: 25406
2006-01-17 20:06:55 +00:00
Robert Bocchino
03e95af9f7
Support for the insertelement operation.
...
llvm-svn: 25405
2006-01-17 20:06:42 +00:00
Robert Bocchino
c744cbe160
Reader support for the insertelement operation.
...
llvm-svn: 25404
2006-01-17 20:06:35 +00:00
Robert Bocchino
fdf9e41848
Lexer and parser support for the insertelement operation.
...
llvm-svn: 25403
2006-01-17 20:06:25 +00:00
Evan Cheng
6f86a7db07
Bug fix: missing LegalizeOp() on newly created nodes.
...
llvm-svn: 25401
2006-01-17 19:47:13 +00:00
Chris Lattner
801f47512d
Clean up the FFS optimization code, and make it correctly create the appropriate
...
unsigned llvm.cttz.* intrinsic, fixing the 2005-05-11-Popcount-ffs-fls regression
last night.
llvm-svn: 25398
2006-01-17 18:27:17 +00:00
Jim Laskey
b9966029fe
Adding basic support for Dwarf line number debug information.
...
I promise to keep future commits smaller.
llvm-svn: 25396
2006-01-17 17:31:53 +00:00
Evan Cheng
14417ed99c
Zero extending load from i1 to i8.
...
llvm-svn: 25391
2006-01-17 07:02:46 +00:00
Duraid Madina
e08a95d3c1
oops, this shouldn't have gotten in
...
llvm-svn: 25388
2006-01-17 03:09:48 +00:00
Evan Cheng
0d5b69f734
SSE does not support i64 SINT_TO_FP (FP stack doesn't either, but we custom
...
expand it), so ask legalizer to expand i32 UINT_TO_FP.
llvm-svn: 25386
2006-01-17 02:32:49 +00:00
Duraid Madina
266ff6056a
use proper (82-bit) spills/fills when spilling FP regs, so that
...
divides don't get broken. this fixes obsequi, smg2000, and probably
a bunch of other stuff (tm)
llvm-svn: 25385
2006-01-17 02:04:52 +00:00
Duraid Madina
c261469ad9
fixing divides
...
llvm-svn: 25383
2006-01-17 01:19:49 +00:00
Chris Lattner
c9fbba6fc0
Revert this, I didn't mean to commit it
...
llvm-svn: 25382
2006-01-17 00:40:24 +00:00
Evan Cheng
561881f30a
Added a FIXME comment about why FST is currently flagged to fpGETRESULT.
...
llvm-svn: 25381
2006-01-17 00:37:42 +00:00
Chris Lattner
f64762c26e
Add support for programs with a null argv[0]
...
llvm-svn: 25379
2006-01-17 00:32:28 +00:00
Evan Cheng
bec9d720b0
Bug fixes: fpGETRESULT should produces a flag result and X86ISD::FST should
...
read a flag.
llvm-svn: 25378
2006-01-17 00:19:47 +00:00
Evan Cheng
c14bb1026b
More typo's
...
llvm-svn: 25375
2006-01-16 23:26:53 +00:00
Evan Cheng
64eeed27d9
Some typo's
...
llvm-svn: 25374
2006-01-16 22:48:46 +00:00
Andrew Lenharth
cfd9c6e526
fix short immediate loads
...
llvm-svn: 25371
2006-01-16 21:41:39 +00:00
Andrew Lenharth
34380b7675
stack and rpcc
...
llvm-svn: 25369
2006-01-16 21:22:38 +00:00
Evan Cheng
911c68d7a8
Fix FP_TO_INT**_IN_MEM lowering.
...
llvm-svn: 25368
2006-01-16 21:21:29 +00:00
Reid Spencer
b4f9a6f110
For PR411:
...
This patch is an incremental step towards supporting a flat symbol table.
It de-overloads the intrinsic functions by providing type-specific intrinsics
and arranging for automatically upgrading from the old overloaded name to
the new non-overloaded name. Specifically:
llvm.isunordered -> llvm.isunordered.f32, llvm.isunordered.f64
llvm.sqrt -> llvm.sqrt.f32, llvm.sqrt.f64
llvm.ctpop -> llvm.ctpop.i8, llvm.ctpop.i16, llvm.ctpop.i32, llvm.ctpop.i64
llvm.ctlz -> llvm.ctlz.i8, llvm.ctlz.i16, llvm.ctlz.i32, llvm.ctlz.i64
llvm.cttz -> llvm.cttz.i8, llvm.cttz.i16, llvm.cttz.i32, llvm.cttz.i64
New code should not use the overloaded intrinsic names. Warnings will be
emitted if they are used.
llvm-svn: 25366
2006-01-16 21:12:35 +00:00
Reid Spencer
84c00ea718
For PR411:
...
This file makes the helper functions for auto-upgrade of llvm assembly and
bytecode more accessible. This is part of de-overloading of intrinsic
functions to support the flat symbol table (no type planes).
llvm-svn: 25365
2006-01-16 21:06:01 +00:00
Andrew Lenharth
81b108c54d
Friendly names
...
llvm-svn: 25364
2006-01-16 19:53:25 +00:00
Chris Lattner
307b7ea15f
fix a crash due to missing parens
...
llvm-svn: 25363
2006-01-16 19:47:21 +00:00
Chris Lattner
7c76290038
add notes from my *other* email acct.
...
llvm-svn: 25362
2006-01-16 17:58:54 +00:00
Chris Lattner
b2eacf48aa
transfer some notes from my email to somewhere useful.
...
llvm-svn: 25361
2006-01-16 17:53:00 +00:00
Duraid Madina
e995910e64
fixing divides: FP should now be 100%, and integers are fine too
...
unless you try to div/mod 0 by anything, in which case you will
get some cute number, and not 0, which is bad.
llvm-svn: 25358
2006-01-16 14:33:04 +00:00
Nate Begeman
1e1eb5ee6c
Constant fold ctpop/ctlz/cttz, and a couple other small cleanups
...
llvm-svn: 25357
2006-01-16 08:07:10 +00:00
Nate Begeman
2642a35f4c
Expand case for 64b Legalize, even though no one should end up using this
...
(itanium supports bswap natively, alpha should custom lower it using the
VAX floating point swapload, ha ha).
llvm-svn: 25356
2006-01-16 07:59:13 +00:00
Nate Begeman
7d831fa5b9
Add BSWAP stuff to intrinsic lowering for CBE & friends.
...
llvm-svn: 25355
2006-01-16 07:57:00 +00:00
Duraid Madina
ba187774fe
fix division! again!! pattern isel, prepare to die.
...
llvm-svn: 25353
2006-01-16 06:33:38 +00:00
Chris Lattner
e636ba84b5
Silly Sparc is big endian. If we have to load args out of incoming stack slots
...
that are smaller than an int, make sure to adjust the frame pointer to take
this into consideration.
llvm-svn: 25351
2006-01-16 01:40:00 +00:00
Chris Lattner
0de2c7d3d8
This pass has never worked correctly. Remove.
...
llvm-svn: 25349
2006-01-16 01:06:00 +00:00
Chris Lattner
9d41ecc95b
Make sure that bool,byte and short arguments are the right type when loaded
...
from memory.
llvm-svn: 25346
2006-01-15 22:22:01 +00:00
Chris Lattner
087bb703d7
Thanks to Daniel Berlin's ETForest fix, we can now use it again for the verifier
...
llvm-svn: 25345
2006-01-15 21:58:50 +00:00
Chris Lattner
9a7e6c7ae0
ET-Forest has issues with unreachable blocks. Temporarily disable verifiers use
...
of it until they are resolved.
llvm-svn: 25341
2006-01-15 20:00:51 +00:00
Chris Lattner
53312c6342
Disable a broken optimization
...
llvm-svn: 25340
2006-01-15 19:15:46 +00:00
Chris Lattner
fcdb420baf
Disable two transformations that contribute to bus errors on SparcV8.
...
llvm-svn: 25339
2006-01-15 18:58:59 +00:00
Evan Cheng
2494ce49f0
Added patterns for 8-bit multiply
...
llvm-svn: 25338
2006-01-15 10:05:20 +00:00
Duraid Madina
c8817d2857
explain that r12 is the stack pointer reg
...
llvm-svn: 25336
2006-01-15 09:45:23 +00:00
Chris Lattner
e96523474b
Don't print a label for the first MBB in a function.
...
Compile this:
%_2E_str_8 = external global [75 x sbyte]
implementation ; Functions:
declare int %printf(sbyte*, ...)
void %test()
%tmp.101 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([75 x sbyte]* %_2E_str_8, int 0, int 0) ) ; <int> [#uses=0]
unreachable
}
to this:
main_endif_2E_8:
save -96, %o6, %o6
sethi %hi(_2E_str_8), %l0
add %l0, %lo(_2E_str_8), %o0
call printf
nop
instead of this:
main_endif_2E_8:
save -96, %o6, %o6
sethi %hi(_2E_str_8), %l0
or %g0, %lo(_2E_str_8), %l1 ;; extra instruction
add %l1, %l0, %o0
call printf
nop
llvm-svn: 25335
2006-01-15 09:26:27 +00:00
Chris Lattner
5bd514d7b0
Use the default impl of DYNAMIC_STACKALLOC, allowing us to delete some code.
...
llvm-svn: 25334
2006-01-15 09:02:48 +00:00
Chris Lattner
78c358d1ad
Use the default lowering of ISD::DYNAMIC_STACKALLOC, delete now dead code.
...
llvm-svn: 25333
2006-01-15 09:00:21 +00:00
Chris Lattner
aea3cccd55
Have legalize take care of DYNAMIC_STACKALLOC for us, implement llvm.stacksave/stackrestore.
...
llvm-svn: 25332
2006-01-15 08:55:25 +00:00
Chris Lattner
59b82f9848
Allow the target to specify 'expand' if they just require the amount to
...
be subtracted from the stack pointer.
llvm-svn: 25331
2006-01-15 08:54:32 +00:00
Chris Lattner
c5101b4ffa
Implement DYNAMIC_STACKALLOC for V8
...
llvm-svn: 25330
2006-01-15 08:43:57 +00:00
Chris Lattner
2d59142613
Fix custom lowering of dynamic_stackalloc
...
llvm-svn: 25329
2006-01-15 08:43:08 +00:00
Chris Lattner
5186bd8312
add a missing break that Reid noticed.
...
llvm-svn: 25328
2006-01-15 08:40:16 +00:00
Chris Lattner
9597b33d58
add a missing node name
...
llvm-svn: 25327
2006-01-15 08:39:35 +00:00
Chris Lattner
e5ca28b74d
reorder passes
...
llvm-svn: 25326
2006-01-15 07:19:53 +00:00
Chris Lattner
02011c9a4f
Token chain results are not always the first or last result. Consider copyfromreg nodes, where they are the middle result (the flag result is last)
...
llvm-svn: 25325
2006-01-14 22:41:46 +00:00
Chris Lattner
c17b41c3ba
Cleanup IA64ISD, tell the graph drawer what the symbolic names for the enums are.
...
llvm-svn: 25324
2006-01-14 22:27:21 +00:00
Chris Lattner
c020bcf850
Change ET-Forest to automatically recalculate its DFSnum's if too many slow
...
queries are made.
Patch by Daniel Berlin!
llvm-svn: 25323
2006-01-14 20:55:09 +00:00
Chris Lattner
8869c6f782
silence a warning
...
llvm-svn: 25322
2006-01-14 20:11:13 +00:00
Chris Lattner
f6d6823f09
Let the inliner update the callgraph to reflect the changes it makes, instead
...
of doing it ourselves. This fixes Transforms/Inline/2006-01-14-CallGraphUpdate.ll
llvm-svn: 25321
2006-01-14 20:09:18 +00:00
Chris Lattner
0841fb1d4c
Teach the inliner to update the CallGraph itself, and have it add edges to
...
llvm.stacksave/restore when it inserts calls to them.
llvm-svn: 25320
2006-01-14 20:07:50 +00:00
Chris Lattner
00ca8d2de8
Add a new CallGraph::getOrInsertFunction for clients to use when updating
...
the callgraph.
llvm-svn: 25317
2006-01-14 20:03:00 +00:00
Chris Lattner
ef530c24c1
FunctionPass's cannot do IPO things.
...
llvm-svn: 25315
2006-01-14 19:30:35 +00:00
Chris Lattner
bc351e171f
add a dump method to CallGraph
...
llvm-svn: 25314
2006-01-14 19:17:02 +00:00
Nate Begeman
542c3c17a9
Remove some duplicated code
...
llvm-svn: 25313
2006-01-14 03:18:27 +00:00
Nate Begeman
2fba8a3aaa
bswap implementation
...
llvm-svn: 25312
2006-01-14 03:14:10 +00:00
Nate Begeman
82049eba2c
Add bswap intrinsics as documented in the Language Reference
...
llvm-svn: 25309
2006-01-14 01:25:24 +00:00
Nate Begeman
f2b38dbdc7
Remove some redundant stuff out of the readme.
...
llvm-svn: 25308
2006-01-14 01:24:22 +00:00
Evan Cheng
3bc25e8a54
A typo.
...
llvm-svn: 25307
2006-01-14 01:18:49 +00:00
Chris Lattner
a4de9baf40
Implement a new InvalidateStructLayoutInfo method and add some comments
...
llvm-svn: 25304
2006-01-14 00:07:34 +00:00
Robert Bocchino
a83529678e
Added instcombine support for extractelement.
...
llvm-svn: 25299
2006-01-13 22:48:06 +00:00
Evan Cheng
392c7d2779
Add truncstore i1 patterns.
...
llvm-svn: 25296
2006-01-13 21:45:19 +00:00
Chris Lattner
5fba6e6696
it is ok to dce stacksave.
...
llvm-svn: 25295
2006-01-13 21:31:54 +00:00
Chris Lattner
503221f5c5
Do a simple instcombine xforms to delete llvm.stackrestore cases.
...
llvm-svn: 25294
2006-01-13 21:28:09 +00:00
Chris Lattner
5f9c134bac
Fix a bug in my last X86 checkin, pointed out by cozmic
...
llvm-svn: 25293
2006-01-13 20:19:44 +00:00
Chris Lattner
c66b223b28
Simplify this a tiny bit by using the new IntrinsicInst functionality.
...
llvm-svn: 25292
2006-01-13 20:11:04 +00:00
Evan Cheng
dba84bbc1e
LHS = X86ISD::CMOVcc LHS, RHS means LHS = RHS if cc. So the operands must be
...
flipped around.
llvm-svn: 25290
2006-01-13 19:51:46 +00:00
Chris Lattner
45406c0c53
Permit inlining functions that contain dynamic allocations now that
...
InlineFunction handles this case safely. This implements
Transforms/Inline/dynamic_alloca_test.ll.
llvm-svn: 25288
2006-01-13 19:35:43 +00:00
Chris Lattner
2be0607a8d
If inlining a call to a function that contains dynamic allocas, wrap the
...
resultant code with llvm.stacksave/llvm.stackrestore intrinsics.
llvm-svn: 25286
2006-01-13 19:34:14 +00:00
Chris Lattner
e24f79a032
Use ClonedCodeInfo to avoid another walk over the inlined code, this this
...
time in common C cases.
llvm-svn: 25285
2006-01-13 19:18:11 +00:00
Chris Lattner
19e6a08d78
Use the ClonedCodeInfo object to avoid scans of the inlined code when
...
it doesn't contain any calls. This is a fairly common case for C++ code,
so it will probably speed up the inliner marginally in these cases.
llvm-svn: 25284
2006-01-13 19:15:15 +00:00
Chris Lattner
908d79556d
Refactor a bunch of invoke handling stuff out into a new function
...
"HandleInlinedInvoke". No functionality change.
llvm-svn: 25283
2006-01-13 19:05:59 +00:00
Andrew Lenharth
045371a744
make DAG isel the default
...
llvm-svn: 25282
2006-01-13 18:49:47 +00:00
Chris Lattner
edad1288fd
Allow the code cloning interfaces to capture some important info about the
...
code being cloned if the client wants.
llvm-svn: 25281
2006-01-13 18:39:17 +00:00
Chris Lattner
257492c0ab
Fix a bug I noticed by inspection: if the first instruction in the inlined
...
function was not an alloca, we wouldn't check the entry block for any allocas,
leading to increased stack space in some cases. In practice, allocas are almost
always at the top of the block, so this was never noticed.
llvm-svn: 25280
2006-01-13 18:16:48 +00:00