Dan Gohman
c070ffc493
FastISel support for exception-handling constructs.
...
- Move the EH landing-pad code and adjust it so that it works
with FastISel as well as with SDISel.
- Add FastISel support for @llvm.eh.exception and
@llvm.eh.selector.
llvm-svn: 57539
2008-10-14 23:54:11 +00:00
Daniel Dunbar
e11e618cc6
Prevent assert when using '"' in names (via hexadecimal).
...
Update LangRef to mention \xx quoting in names.
llvm-svn: 57538
2008-10-14 23:51:43 +00:00
Daniel Dunbar
f3b4f45878
Change getLLVMName to use raw_ostream & PrintLLVMName.
...
- Avoids duplicated quotification code.
- Remove QuoteNameIfNeeded.
- No functionality change.
llvm-svn: 57537
2008-10-14 23:28:09 +00:00
Dale Johannesen
19407daf55
Accept -march=i586, because gcc does (a synonym
...
for pentium). Fixes
gcc.target/i386/20000720-1.c
gcc.target/i386/pr26826.c
llvm-svn: 57528
2008-10-14 22:06:33 +00:00
Evan Cheng
3faedff2de
Rename LoadX to LoadExt.
...
llvm-svn: 57526
2008-10-14 21:26:46 +00:00
Jim Grosbach
d0ff59ec42
Update ARM Insn encoding to get endian-ness to match the documentation (31-0 left to right)
...
llvm-svn: 57524
2008-10-14 20:36:24 +00:00
Dan Gohman
9543edc4ef
Fix command-line option printing to print two spaces where needed,
...
instead of requiring all "short description" strings to begin with
two spaces. This makes these strings less mysterious, and it fixes
some cases where short description strings mistakenly did not
begin with two spaces.
llvm-svn: 57521
2008-10-14 20:25:08 +00:00
Evan Cheng
591baeed7c
Combine (fcmp cc0 x, y) | (fcmp cc1 x, y) into a single fcmp when possible.
...
llvm-svn: 57515
2008-10-14 18:44:08 +00:00
Evan Cheng
778b47e6c0
- Somehow I forgot about one / une.
...
- Renumber fcmp predicates to match their icmp counterparts.
- Try swapping operands to expose more optimization opportunities.
llvm-svn: 57513
2008-10-14 18:13:38 +00:00
Evan Cheng
39a819027c
Fix indentation.
...
llvm-svn: 57508
2008-10-14 17:15:39 +00:00
Evan Cheng
91528965e7
Optimize anding of two fcmp into a single fcmp if the operands are the same. e.g. uno && ueq -> ueq
...
ord && olt -> olt
ord && ueq -> oeq
llvm-svn: 57507
2008-10-14 17:15:11 +00:00
Nuno Lopes
08a1a82acc
little optimization: reuse getPointerToGlobalIfAvailable(CGV) value in emitGlobals()
...
llvm-svn: 57484
2008-10-14 10:04:52 +00:00
Dan Gohman
e08e0dcfcc
When doing the very-late shift-and address-mode optimization,
...
create a new DAG node to represent the new shift to keep the
DAG consistent, even though it'll almost always be folded into
the address.
If a user of the resulting address has multiple uses, the
nodes may get revisited by a later MatchAddress call, in which
case DAG inconsistencies do matter.
This fixes PR2849.
llvm-svn: 57465
2008-10-13 20:52:04 +00:00
Evan Cheng
de99d94c58
FIX PR2794. Make sure SIGN_EXTEND_INREG nodes introduced by LegalizeSetCCOperands are leglized. Patch by Richard Pennington.
...
llvm-svn: 57460
2008-10-13 18:46:18 +00:00
Evan Cheng
731f400eac
Also update sub-register intervals after a trivial computation is rematt'ed for a copy instruction. PR2775.
...
llvm-svn: 57458
2008-10-13 18:35:52 +00:00
Matthijs Kooijman
b86d48c717
Make InstructionCombining::getBitCastOperand() recognize GEP instructions and
...
constant expression with all zero indices as being the same as a bitcast.
llvm-svn: 57442
2008-10-13 15:17:01 +00:00
Matthijs Kooijman
1ea1008e1f
* Make TargetLowering not crash when TargetMachine::getTargetAsmInfo() returns
...
null. This assumes that any target that does not have AsmInfo, does not
support "LocAndDot".
llvm-svn: 57438
2008-10-13 12:41:46 +00:00
Matthijs Kooijman
28ae70be64
Make MachineFunction not crash when TargetMachine::getRegisterInfo() returns
...
NULL, but just hide some debug output then.
llvm-svn: 57437
2008-10-13 12:37:16 +00:00
Gabor Greif
5f75f1372e
do not use deprecated interfaces
...
llvm-svn: 57433
2008-10-13 10:21:17 +00:00
Nick Lewycky
ed4cd79ffc
Disallow the construction of SCEVs with could-not-compute operands. Catch CNCs
...
returned by BinomialCoefficient and don't try to operate with them. This
replaces the previous fix for PR2857.
llvm-svn: 57431
2008-10-13 03:58:02 +00:00
Chris Lattner
16c0109fd4
calls can be supported.
...
llvm-svn: 57428
2008-10-13 01:59:13 +00:00
Dale Johannesen
7fbfe2a371
Change TAG_ names to DW_TAG for gcc (testsuite) compatibility.
...
llvm-svn: 57425
2008-10-12 21:23:01 +00:00
Owen Anderson
dbb4904467
Fix a bug in live-in detection that caused lost-copy problems to show up.
...
llvm-svn: 57424
2008-10-12 20:39:30 +00:00
Anton Korobeynikov
6204f4ac43
Update size of inst correctly with segment override.
...
llvm-svn: 57414
2008-10-12 10:30:11 +00:00
Owen Anderson
fe70fff286
Add special-case code to allow null-guards on calls to malloc.
...
llvm-svn: 57413
2008-10-12 08:10:46 +00:00
Owen Anderson
86d9a902dc
Make Escape Analysis work for any pointer.
...
llvm-svn: 57412
2008-10-12 07:33:29 +00:00
Dale Johannesen
2d23786266
Change Dwarf comments starting with AT_ to DW_AT_ to
...
match gcc. Helps with the testsuite.
llvm-svn: 57410
2008-10-12 06:20:47 +00:00
Owen Anderson
9b86d152be
Fix crashes and infinite loops.
...
llvm-svn: 57408
2008-10-12 06:03:38 +00:00
Owen Anderson
d724368eeb
Duncan convinced me that it's not possible to transform control-based escapes into
...
data-based ones. Just be conservative when analyzing control-based escapes.
llvm-svn: 57400
2008-10-12 03:59:45 +00:00
Chris Lattner
3c8eace4da
fix typo
...
llvm-svn: 57388
2008-10-11 23:59:03 +00:00
Chris Lattner
7a61ef92f5
Fix PR2697 by rewriting the '(X / pos) op neg' logic. This also changes
...
a couple other cases for clarity, but shouldn't affect correctness.
Patch by Eli Friedman!
llvm-svn: 57387
2008-10-11 22:55:00 +00:00
Chris Lattner
7910d59d44
Change CALLSEQ_BEGIN and CALLSEQ_END to take TargetConstant's as
...
parameters instead of raw Constants. This prevents the constants from
being selected by the isel pass, fixing PR2735.
llvm-svn: 57385
2008-10-11 22:08:30 +00:00
Chris Lattner
3d1cdfc99e
rearrange some code.
...
llvm-svn: 57384
2008-10-11 22:07:19 +00:00
Duncan Sands
f175d9eae0
Fix comment typo.
...
llvm-svn: 57381
2008-10-11 19:34:24 +00:00
Anton Korobeynikov
d8b3e6f0ce
Add ability to override segment (mostly for code emitter purposes).
...
llvm-svn: 57380
2008-10-11 19:09:15 +00:00
Daniel Dunbar
73ceb8010b
Unbreak DbgStopPointInst::getFileName().
...
llvm-svn: 57373
2008-10-11 06:40:56 +00:00
Chris Lattner
2f2ef3f25f
simplify comparison
...
llvm-svn: 57371
2008-10-11 00:08:02 +00:00
Dale Johannesen
03d0a7d70c
Fix SSE4.1 roundss, roundsd. While the instructions have
...
the same pattern as roundpd/roundps, the Intel compiler
builtins do not: rounds* has an extra operand. Fixes
gcc.target/i386/sse4_1-rounds[sd]-[1234].c
llvm-svn: 57370
2008-10-10 23:51:03 +00:00
Devang Patel
255fee3bce
Check loop exit predicate properly while eliminating one iteration loop.
...
This patch fixes PR 2869
llvm-svn: 57369
2008-10-10 22:02:57 +00:00
Anton Korobeynikov
e44fccb2f0
Fix a thinko and unbreak sparc default CC
...
llvm-svn: 57368
2008-10-10 21:47:37 +00:00
Dale Johannesen
0c6ea38b92
Remove some overzealous checks that were rejecting
...
valid comments in inline assembly.
gcc.target/i386/20011009-1.c
llvm-svn: 57365
2008-10-10 21:04:42 +00:00
Anton Korobeynikov
f5398df73c
Extend set of return registers on sparc until someone will implement MRV support there. At least, this will allow libgcc compile, however we are not ABI-compatible with stuff compiled with native gcc.
...
llvm-svn: 57364
2008-10-10 20:30:14 +00:00
Anton Korobeynikov
1ead869e67
Ignore extra 'r' modifier for now
...
llvm-svn: 57363
2008-10-10 20:29:50 +00:00
Anton Korobeynikov
ffdc3498b4
Use expand for smul_lohi for now
...
llvm-svn: 57362
2008-10-10 20:29:31 +00:00
Anton Korobeynikov
8ed548b24a
Add rudimentary support for 'r' register operand
...
llvm-svn: 57359
2008-10-10 20:28:10 +00:00
Anton Korobeynikov
ba8bb3e12f
Cleanup
...
llvm-svn: 57358
2008-10-10 20:27:31 +00:00
Oscar Fuentes
32e927030e
CMake: updated lib/Analysis/CMakeLists.txt.
...
llvm-svn: 57357
2008-10-10 18:51:36 +00:00
Mon P Wang
dc1aa21e4e
Revert r57340 move guard mutex in getPointerToFunction as this can cause
...
deadlock issues with java
llvm-svn: 57356
2008-10-10 18:07:10 +00:00
Nuno Lopes
cc4f37aa68
fix memleak by cleaning the global sets on pass exit
...
llvm-svn: 57353
2008-10-10 16:25:50 +00:00
Anton Korobeynikov
6054846989
Add rudimentary asmprinter support for printing inline asm operands for sparc.
...
llvm-svn: 57346
2008-10-10 10:15:03 +00:00
Anton Korobeynikov
a12d563611
Add dummy 'm' inline asm constraint handler for Sparc. I'm not sure, whether it is correct, however :)
...
llvm-svn: 57345
2008-10-10 10:14:47 +00:00
Anton Korobeynikov
8cfd14b138
Cleanup
...
llvm-svn: 57344
2008-10-10 10:14:15 +00:00
Owen Anderson
5a5a9162e6
Add a basic intra-procedural escape analysis. This hasn't be extensively tested yet, but feedback is welcome.
...
llvm-svn: 57342
2008-10-10 08:36:25 +00:00
Mon P Wang
6c79c8e822
Moved guard mutex upwards to guard materializing a function
...
in getPointerToFunction
llvm-svn: 57340
2008-10-10 01:47:42 +00:00
Mon P Wang
3b3ab0fa30
Added missing print functions that take a raw_ostream
...
llvm-svn: 57339
2008-10-10 01:43:55 +00:00
Dale Johannesen
cc34c2da3a
Generated files for previous checkin.
...
llvm-svn: 57331
2008-10-09 23:01:34 +00:00
Dale Johannesen
075a62519f
Add a "loses information" return value to APFloat::convert
...
and APFloat::convertToInteger. Restore return value to
IEEE754. Adjust all users accordingly.
llvm-svn: 57329
2008-10-09 23:00:39 +00:00
Dale Johannesen
9e57068854
Rename APFloat::convertToAPInt to bitcastToAPInt to
...
make it clearer what the function does. No functional
change.
llvm-svn: 57325
2008-10-09 18:53:47 +00:00
Nick Lewycky
843c7dfe05
Don't drop alignment on globals when cloning.
...
llvm-svn: 57320
2008-10-09 06:27:14 +00:00
Chris Lattner
284ae75537
get CodeGen/Alpha/mul128.ll to work.
...
llvm-svn: 57318
2008-10-09 04:50:56 +00:00
Dale Johannesen
9c6ffd55b4
Align EH tables before label is emitted, not after,
...
thus aligning the label.
llvm-svn: 57310
2008-10-08 21:50:21 +00:00
Dale Johannesen
817eff07b1
(re)Put const weak strings in appropriate section on Darwin.
...
g++dg/abi/key2.C
llvm-svn: 57309
2008-10-08 21:49:47 +00:00
Nuno Lopes
a4813e472c
dont specialize weak functions and the like
...
llvm-svn: 57305
2008-10-08 18:45:59 +00:00
Jim Grosbach
974799922e
Comment to be explicit that the enumeration values for CondCodes matter.
...
llvm-svn: 57295
2008-10-08 16:24:35 +00:00
Duncan Sands
bc53ce331a
Use template to distinguish between function variants.
...
GCC 4.4.0 gives an error on the "int" declaration for example
saying that it has already been declared (using the "short"
one). Using templates here allow the compiler to distinguish
between the function to choose.
Also, "llvm/Support/DataTypes.h" was not included, leading to
error messages about not knowing "uint32_t" for example.
Patch by Samuel Tardieu.
llvm-svn: 57292
2008-10-08 07:44:52 +00:00
Duncan Sands
8f296a3788
Add <cstdio> include where needed by gcc-4.4.
...
Patch by Samuel Tardieu.
llvm-svn: 57291
2008-10-08 07:23:46 +00:00
Chris Lattner
293590ca07
regenerate
...
llvm-svn: 57290
2008-10-08 06:44:45 +00:00
Chris Lattner
4afce47e9b
Add missing semicolumns in parser rules, those missing semicolumns
...
are required to compile with the latest Bison.
Patch by Samuel Tardieu!
llvm-svn: 57289
2008-10-08 06:44:36 +00:00
Chris Lattner
0aa4423c8c
Add parentheses to avoid warnings in GCC 4.4.0,
...
patch by Samuel Tardieu!
llvm-svn: 57288
2008-10-08 06:42:28 +00:00
Owen Anderson
7f99714393
Fix the case where an instruction is not properly marked as using all registers that alias its inputs.
...
llvm-svn: 57286
2008-10-08 04:30:51 +00:00
Dan Gohman
08e60cee90
Remove -disable-fast-isel. Use cl::boolOrDefault with -fast-isel
...
instead.
So now: -fast-isel or -fast-isel=true enable fast-isel, and
-fast-isel=false disables it. Fast-isel is also on by default
with -fast, and off by default otherwise.
llvm-svn: 57270
2008-10-07 23:00:56 +00:00
Dan Gohman
c65ca09308
Add MBB successors and physreg Uses in the same order that
...
SDISel typically adds them in. This makes it a little easier
to compare FastISel output with SDISel output.
llvm-svn: 57266
2008-10-07 22:10:33 +00:00
Dan Gohman
6d98c5ab31
Avoid emitting redundant materializations of integer constants
...
for things like null pointers, which at this level aren't
different from regular integer constants.
llvm-svn: 57265
2008-10-07 22:03:27 +00:00
Dan Gohman
2561119124
Instead of emitting an implicit use for the super-register of
...
X86::CL that was used, emit an EXTRACT_SUBREG from the CL
super-register to CL. This more precisely describes how the
CL register is being used.
llvm-svn: 57264
2008-10-07 21:50:36 +00:00
Jim Grosbach
8ac554209f
Unconditional branch instruction encoding fix. Needs to use ABI, not AXI, to get the proper opcode bits.
...
llvm-svn: 57262
2008-10-07 21:08:09 +00:00
Jim Grosbach
5fb8bb7434
need ARM.h for ARMCC definition
...
llvm-svn: 57261
2008-10-07 21:01:51 +00:00
Owen Anderson
c9a628af26
Add an option to enable StrongPHIElimination, for ease of testing.
...
llvm-svn: 57259
2008-10-07 20:22:28 +00:00
Jim Grosbach
d44d20be6e
Encode the conditional execution predicate when JITing.
...
llvm-svn: 57258
2008-10-07 19:05:35 +00:00
Dale Johannesen
3d2e449078
Model hardwired inputs & outputs of x86 8-bit divides correctly.
...
Fixes local RA miscompilation of gcc.c-torture/execute/20020904-1.c -O0.
llvm-svn: 57257
2008-10-07 18:54:28 +00:00
Andrew Lenharth
66cc9d5e53
Use Dan's supperior check
...
llvm-svn: 57255
2008-10-07 18:27:23 +00:00
Andrew Lenharth
c83731e00a
Correctly set attributes when removing args during cloning. Fixes PR2765
...
llvm-svn: 57254
2008-10-07 18:08:38 +00:00
Jim Grosbach
61f8207ac9
Clarify naming and correct conditional so that CMP and CMN instructions get the Rn operand encoded properly
...
llvm-svn: 57252
2008-10-07 17:42:09 +00:00
Jim Grosbach
a52546fec4
Fix Opcode values of CMP and CMN
...
llvm-svn: 57251
2008-10-07 17:40:46 +00:00
Andrew Lenharth
950618a347
No need for |=
...
llvm-svn: 57249
2008-10-07 17:11:29 +00:00
Andrew Lenharth
2399c6cb95
Use ADDC if it is valid at any smaller size. Do it right this time
...
llvm-svn: 57248
2008-10-07 17:09:16 +00:00
Andrew Lenharth
84166420cc
Use ADDC if it is valid at any smaller size. fixes test/Codegen/Generic/i128-addsub.ll on x86
...
llvm-svn: 57247
2008-10-07 17:03:15 +00:00
Anders Carlsson
a9c42526f8
Certain patterns involving the "movss" instruction were marked as requiring SSE2, when in reality movss is an SSE1 instruction.
...
llvm-svn: 57246
2008-10-07 16:14:11 +00:00
Andrew Lenharth
c00c2a0058
Expand arith on machines without carry flags
...
llvm-svn: 57243
2008-10-07 14:15:42 +00:00
Andrew Lenharth
7a997d1cfd
Note that ADDC and company don't actually expand yet (missing in legalize
...
llvm-svn: 57226
2008-10-07 02:10:26 +00:00
Dale Johannesen
3b86d974bc
Mark negative-zero-to-int conversion as Inexact,
...
since -0.0 can't be represented as an int.
This prevents llvm from reducing -0.0 to a
load-and-convert of int 0. Fixes
ieee.exp/mzero[2356].c in gcc testsuite.
llvm-svn: 57224
2008-10-07 00:40:01 +00:00
Dan Gohman
188af3ae0d
Correctly handle calls with no return values. This fixes
...
2006-01-23-UnionInit on x86-64 when inlining is not enabled.
llvm-svn: 57223
2008-10-07 00:12:37 +00:00
Devang Patel
378c8633e5
Fix typo, fix PR 2865.
...
llvm-svn: 57221
2008-10-06 23:22:54 +00:00
Dale Johannesen
40d00c0979
Be more precise about which conversions of NaNs
...
are Inexact. (These are not Inexact as defined
by IEEE754, but that seems like a reasonable way
to abstract what happens: information is lost.)
llvm-svn: 57218
2008-10-06 22:59:10 +00:00
Evan Cheng
88d76ffe8a
Fix PR2850 and PR2863. Only generate movddup for 128-bit SSE vector shuffles.
...
llvm-svn: 57210
2008-10-06 21:13:08 +00:00
Dale Johannesen
24ea5f2be7
Temporarily revert functionality change from my previous patch;
...
it is too aggressive.
llvm-svn: 57203
2008-10-06 20:43:48 +00:00
Devang Patel
ca66d093c0
Remove interfaces implemented by dead pass from the list of available passes.
...
Patch By Matthijs Kooijman.
llvm-svn: 57202
2008-10-06 20:36:36 +00:00
Dale Johannesen
89329a1d0a
Mark shortening NaN conversions as Inexact. PR 2856.
...
Improve description of unsupported formats.
llvm-svn: 57185
2008-10-06 18:22:29 +00:00
Devang Patel
07a9ce22e4
It is possible that all functions in one module are not being
...
optimized for size. Set OptForSize for each function separately.
llvm-svn: 57182
2008-10-06 18:03:39 +00:00
Dan Gohman
8b33abdd5b
Don't dereference the end() iterator. Thanks to
...
ENABLE_EXPENSIVE_CHECKS for finding this.
llvm-svn: 57181
2008-10-06 18:00:07 +00:00
Devang Patel
4f91b766d2
Remove unncessary isDeclaration() checks.
...
llvm-svn: 57179
2008-10-06 17:30:07 +00:00
Matthijs Kooijman
12cd5d041d
Allow scalarrepl to treat an all-zero GEP just as bitcast.
...
This includes not marking a GEP involving a vector as unsafe, but only when it
has all zero indices. This allows scalarrepl to work in a few more cases.
llvm-svn: 57177
2008-10-06 16:23:31 +00:00
Chris Lattner
8e41e3ac13
reorder #include order, patch by Kenneth Boyd!
...
llvm-svn: 57148
2008-10-06 03:54:25 +00:00
Chris Lattner
5d6871b940
Add #include to get alloca, patch by Kenneth Boyd!
...
llvm-svn: 57147
2008-10-06 03:53:16 +00:00
Chris Lattner
4622ca2262
fix an incorrect and extremely confusing error message
...
llvm-svn: 57123
2008-10-05 18:24:03 +00:00
Chris Lattner
1e4f7de3b6
make the autoupgrade code for ret attributes dramatically simpler
...
and actually work. We can now read the llvm 2.3 bc file from PR2849
llvm-svn: 57122
2008-10-05 18:22:09 +00:00
Nuno Lopes
4cf7f0e3cd
regenerate
...
llvm-svn: 57114
2008-10-05 16:49:34 +00:00
Nuno Lopes
9e274c3532
clean ArgTypeListI production: free the PATypeHolder
...
llvm-svn: 57113
2008-10-05 16:49:03 +00:00
Anton Korobeynikov
8106145480
Emit type-correct constant null. Also fix a typo.
...
Patch by Robert G. Jakabosky!
llvm-svn: 57110
2008-10-05 15:07:06 +00:00
Anton Korobeynikov
1f7e8162d9
Fix weird think-o and unbreak build on all gcc-3.4.x-based platforms (e.g. mingw)
...
llvm-svn: 57106
2008-10-05 08:53:29 +00:00
Chris Lattner
ed0f84ee2d
this case is matched now.
...
llvm-svn: 57096
2008-10-05 02:16:12 +00:00
Chris Lattner
107e8f8b60
rewrite bswap matching to be more general, allowing arbitrary
...
shifting and masking inside a bswap expr. This allows it to handle
the cases from PR2842, which involve the intermediate 'or'
expressions being shifted, not just the input value.
llvm-svn: 57095
2008-10-05 02:13:19 +00:00
Chris Lattner
6fae76bbf3
fix a bug where the bswap matcher could match a case involving
...
ashr. It should only apply to lshr.
llvm-svn: 57089
2008-10-05 00:50:57 +00:00
Chris Lattner
576e29c87d
wrap some long lines and expand i32 mul's to libcalls, inspired by a
...
patch by Mikael Lepisto!
llvm-svn: 57077
2008-10-04 21:27:46 +00:00
Oscar Fuentes
4bf1c53073
CMake: Reflected changes on source file structure. New plugin support
...
for llvmc2 incomplete.
llvm-svn: 57076
2008-10-04 21:18:50 +00:00
Duncan Sands
e22385630e
Ignore loads from and stores to local memory (i.e. allocas)
...
when deciding whether to mark a function readnone/readonly.
Since the pass is currently run before SROA, this may be
quite helpful. Requested by Chris on IRC.
llvm-svn: 57050
2008-10-04 13:24:24 +00:00
Nick Lewycky
53e751fcba
Allow the construction of SCEVs with SCEVCouldNotCompute operands, by
...
implementing folding. Fixes PR2857.
llvm-svn: 57049
2008-10-04 11:19:07 +00:00
Anton Korobeynikov
4cc9051fbb
Revert r56675 - it breaks unwinding runtime everywhere.
...
llvm-svn: 57048
2008-10-04 11:09:36 +00:00
Argyrios Kyrtzidis
8614f628d2
Add implementations for sys::Memory::setWritable and sys::Memory::setExecutable on Win32 platform.
...
llvm-svn: 57047
2008-10-04 08:15:32 +00:00
Argyrios Kyrtzidis
b9e76c172c
Fix compilation error on MSVC.
...
llvm-svn: 57046
2008-10-04 08:11:49 +00:00
Dan Gohman
5944450d5f
Fix fast-isel's handling of atomic instructions. They may
...
expand to multiple basic blocks, in which case fast-isel
needs to informed of which block to use as it resumes
inserting instructions.
llvm-svn: 57040
2008-10-04 00:56:36 +00:00
Dan Gohman
638a8001c8
Fix a bug in the local allocator's liveness computation where it
...
was setting kill flags on tied uses in two-address instructions.
The kill flags were causing the allocator to think it could
allocate the use and its tied def in different registers.
llvm-svn: 57039
2008-10-04 00:31:14 +00:00
Dale Johannesen
dc83b95ba5
Make atomic Swap work, 64-bit on x86-32.
...
Make it all work in non-pic mode.
llvm-svn: 57034
2008-10-03 22:25:52 +00:00
Dan Gohman
700611dfc6
Clean up some multiple-return-value code that is no longer
...
applicable.
llvm-svn: 57033
2008-10-03 22:21:24 +00:00
Devang Patel
0d22d8ebdb
Fix function attribute verification check.
...
Thanks Duncan!
llvm-svn: 57029
2008-10-03 21:11:02 +00:00
Dale Johannesen
27d8955b8f
Pass MemOperand through for 64-bit atomics on 32-bit,
...
incidentally making the case where the memop is a
pointer deref work. Fix cmp-and-swap regression.
llvm-svn: 57027
2008-10-03 19:41:08 +00:00
Devang Patel
55401473f9
Nick Lewycky's patch.
...
While hosting instruction check PHI node.
llvm-svn: 57025
2008-10-03 18:57:37 +00:00
Dan Gohman
dc99a744fd
Use -1ULL instead of uint64_t(-1), at Anton's suggestion.
...
llvm-svn: 57021
2008-10-03 17:56:45 +00:00
Devang Patel
2bed4d4ca0
Verify function attributes.
...
llvm-svn: 57020
2008-10-03 17:50:00 +00:00
Evan Cheng
d572afd76c
Fix typos pointed out by Duncan. Also untabify these files.
...
llvm-svn: 57018
2008-10-03 17:11:58 +00:00
Daniel Dunbar
40fb36a42c
Unbreak build.
...
llvm-svn: 57017
2008-10-03 17:11:57 +00:00
Dan Gohman
00034b1416
Avoid creating two TargetLowering objects for each target.
...
Instead, just create one, and make sure everything that needs
it can access it. Previously most of the SelectionDAGISel
subclasses all had their own TargetLowering object, which was
redundant with the TargetLowering object in the TargetMachine
subclasses, except on Sparc, where SparcTargetMachine
didn't have a TargetLowering object. Change Sparc to work
more like the other targets here.
llvm-svn: 57016
2008-10-03 16:55:19 +00:00
Dan Gohman
e41ac02dce
Remove an unused field.
...
llvm-svn: 57014
2008-10-03 16:17:33 +00:00
Jim Grosbach
a49386d8e7
On Darwin ARM, memory needs special handling to do JIT. This patch expands
...
this handling to work properly for modifying stub functions, relocations
back to entry points after JIT compilation, etc..
llvm-svn: 57013
2008-10-03 16:17:20 +00:00
Jim Grosbach
d9ff019d3e
Indexing off by one resulted in errant encoding of source register for
...
reg->reg moves.
llvm-svn: 57011
2008-10-03 15:53:56 +00:00
Jim Grosbach
e398f553b2
NeedStub/DoesntNeedStub logic was reversed, leading to not using a stub
...
for global relocations that do need them (libc calls, for example).
llvm-svn: 57010
2008-10-03 15:52:42 +00:00
Nuno Lopes
3fbdc238d6
regenerate
...
llvm-svn: 57009
2008-10-03 15:52:39 +00:00
Nuno Lopes
5cb07eb550
fix more memleaks in ResolveTypeTo() and ParseGlobalVariable()
...
llvm-svn: 57008
2008-10-03 15:51:46 +00:00
Nuno Lopes
263d218cd1
regenerate with bison 2.3
...
llvm-svn: 57007
2008-10-03 15:45:58 +00:00
Dan Gohman
30c5ce1b7d
Switch the MachineOperand accessors back to the short names like
...
isReg, etc., from isRegister, etc.
llvm-svn: 57006
2008-10-03 15:45:36 +00:00
Nuno Lopes
949c7ea3e7
fix memleak in FunctionHeaderH
...
llvm-svn: 57005
2008-10-03 15:44:21 +00:00
Duncan Sands
00b25fea88
The result of getSetCCResultType (eg: i32) may be larger
...
than the type an i1 is promoted to (eg: i8). Account
for this. Noticed by Tilmann Scheller on CellSPU; he
will hopefully take care of fixing this in LegalizeDAG
and adding a testcase!
llvm-svn: 56997
2008-10-03 07:41:46 +00:00
Duncan Sands
5edd9b2350
Teach internalize to preserve the callgraph.
...
Why? Because it was there!
llvm-svn: 56996
2008-10-03 07:36:09 +00:00
Nicolas Geoffray
c3efec61f5
Acquire the lock only when necessary. More precisely, do not acquire
...
the lock when calling a method which may materialize the llvm::Function.
llvm-svn: 56995
2008-10-03 07:27:08 +00:00
Owen Anderson
e98ca283b0
SplitBlock should only attempt to update LoopInfo if it is actually being used.
...
llvm-svn: 56994
2008-10-03 06:55:35 +00:00
Dan Gohman
68e27d0b27
Implement fast-isel support for zero-extending from i1.
...
It turns out that this is a fairly common operation,
and it's easy enough to handle.
llvm-svn: 56990
2008-10-03 01:28:47 +00:00
Dan Gohman
78ef9889c9
Fix X86FastISel to handle dynamic allocas that have avoided
...
getting inserted into the ValueMap. This avoids infinite
recursion in some rare cases.
llvm-svn: 56989
2008-10-03 01:27:49 +00:00
Dan Gohman
e75d14f8b0
Optimize conditional branches in X86FastISel. This replaces
...
sequences like this:
sete %al
testb %al, %al
jne LBB11_1
with this:
je LBB11_1
llvm-svn: 56969
2008-10-02 22:15:21 +00:00
Dan Gohman
bf63ae1e29
Add a new MachineBasicBlock utility function, isLayoutSuccessor, that
...
can be used when deciding if a block can transfer control to another
via a fall-through instead of a branch.
llvm-svn: 56968
2008-10-02 22:09:09 +00:00
Andrew Lenharth
106090d2a6
fix build gcc 4.3
...
llvm-svn: 56965
2008-10-02 20:15:08 +00:00
Owen Anderson
1c171e1d1c
Use a multimap rather than a map for holding the list of copies to insert, so we don't lose copies when two of them have
...
the same source. I don't know what I was thinking when I wrote this originally.
Note: There's probably a more efficient way to do this, but I need to think about it some more, and about what determinism
guarantees need to be present.
llvm-svn: 56964
2008-10-02 19:40:33 +00:00
Dale Johannesen
dbd7b1bd33
Handle some 64-bit atomics on x86-32, some of the time.
...
llvm-svn: 56963
2008-10-02 18:53:47 +00:00
Devang Patel
92bd02d528
Remove redundant check.
...
llvm-svn: 56960
2008-10-02 18:38:23 +00:00
Evan Cheng
c589085710
A Partitioned Boolean Quadratic Programming (PBQP) based register allocator.
...
Contributed by Lang Hames.
llvm-svn: 56959
2008-10-02 18:29:27 +00:00
Oscar Fuentes
c1d88c3b68
CMake: Added Host.cpp to lib/System/CMakeLists.txt.
...
llvm-svn: 56957
2008-10-02 17:39:29 +00:00
Dan Gohman
c48242640d
Fix a think-o in isSafeToMove. This fixes it from thinking that
...
volatile memory references are safe to move.
llvm-svn: 56948
2008-10-02 15:04:30 +00:00
Dan Gohman
bba3fb6d18
Work around an interaction between fast-isel and regalloc=local. The
...
local register allocator's physreg liveness doesn't recognize subregs,
so it doesn't know that defs of %ecx that are immediately followed by
uses of %cl aren't dead. This comes up due to the way fast-isel emits
shift instructions.
This is a temporary workaround. Arguably, local regalloc should
handle subreg references correctly. On the other hand, perhaps
fast-isel should use INSERT_SUBREG instead of just assigning to the
most convenient super-register of %cl when lowering shifts.
This fixes MultiSource/Benchmarks/MallocBench/espresso,
MultiSource/Applications/hexxagon, and others, under -fast.
llvm-svn: 56947
2008-10-02 14:56:12 +00:00
Bill Wendling
1c97db4090
"The original bug was a complaint that _mm_srli_si128 mis-compiled when passed
...
a constant vector ("{0x123, 0x456}" syntax). The fix is to simplify the
_mm_srli_si128 macro, and move the "* 8" from the macro into the compiler
back-end. I can't change the existing __builtins because so many people are
using them :-(."
Patch by Stuart Hastings!
llvm-svn: 56944
2008-10-02 05:56:52 +00:00
Daniel Dunbar
1fab10702e
Add llvm::sys::{osName,osVersion} for retrieving operating system name
...
& version as strings.
- Win32 code is untested.
llvm-svn: 56942
2008-10-02 01:17:28 +00:00
Devang Patel
d90556aed0
Attributes noinline alwaysinline are incompatible
...
llvm-svn: 56939
2008-10-01 23:41:25 +00:00
Devang Patel
a5cda569d3
Remove OptimizeForSize global. Use function attribute optsize.
...
llvm-svn: 56937
2008-10-01 23:18:38 +00:00
Dan Gohman
cd111d96c6
Enable FastISel by default (on x86 and x86-64) with the -fast option.
...
llvm-svn: 56930
2008-10-01 20:39:19 +00:00
Chris Lattner
91e5279de1
add a new form of Type::dump that takes a module for type names,
...
patch provided by Tomas Lindquist Olsen!
llvm-svn: 56929
2008-10-01 20:16:19 +00:00
Dan Gohman
e1d0930044
Make some implicit conversions explicit, to avoid compiler warnings.
...
llvm-svn: 56927
2008-10-01 19:58:59 +00:00
Dan Gohman
4aacc3ab83
Split x86's ADJCALLSTACK instructions into 32-bit and 64-bit forms.
...
This allows the 64-bit forms to use+def RSP instead of ESP. This
doesn't fix any real bugs today, but it is more precise and it
makes the debug dumps on x86-64 look more consistent.
Also, add some comments describing the CALL instructions' physreg
operand uses and defs.
llvm-svn: 56925
2008-10-01 18:28:06 +00:00
Jim Grosbach
0268ee4c25
Fix typo s/ther/there/
...
llvm-svn: 56924
2008-10-01 18:16:49 +00:00
Duncan Sands
88d8323743
Factorize code: remove variants of "strip off
...
pointer bitcasts and GEP's", and centralize the
logic in Value::getUnderlyingObject. The
difference with stripPointerCasts is that
stripPointerCasts only strips GEPs if all
indices are zero, while getUnderlyingObject
strips GEPs no matter what the indices are.
llvm-svn: 56922
2008-10-01 15:25:41 +00:00
Dan Gohman
6466b44315
Fold trivial two-operand tokenfactors where the operands are equal
...
immediately.
llvm-svn: 56921
2008-10-01 15:11:19 +00:00
Dan Gohman
8ba73d6d60
Don't prepend a space character for constants in Value::print.
...
llvm-svn: 56920
2008-10-01 15:09:37 +00:00
Dan Gohman
81ade97fe0
Fix typos in comments.
...
llvm-svn: 56919
2008-10-01 15:07:49 +00:00
Nuno Lopes
8bf32ebde6
revert the addition of Preverves(CallGraph), per Duncan's comments
...
llvm-svn: 56917
2008-10-01 09:13:40 +00:00
Dan Gohman
d6e96e9888
Mark CALL instructions as having a Use of ESP/RSP.
...
llvm-svn: 56911
2008-10-01 04:14:30 +00:00
Dan Gohman
b6d0fe7797
Call ScalarEvolution's deleteValueFromRecords before deleting an
...
instruction, not after. This fixes some uses of free'd memory.
llvm-svn: 56908
2008-10-01 02:02:03 +00:00
Bill Wendling
d7effcf8da
Implement the -fno-builtin option in the front-end, not in the back-end.
...
llvm-svn: 56900
2008-10-01 00:59:58 +00:00
Owen Anderson
9c1e298f14
Mark merged-in VNInfo's as being PHIKilled.
...
llvm-svn: 56893
2008-09-30 23:58:47 +00:00
Owen Anderson
b89aa47081
Fix a simple error in renumbering kill markaers, that took an inordinant amount of time to track down.
...
llvm-svn: 56889
2008-09-30 22:51:54 +00:00
Bill Wendling
618d422cdd
Just don't transform this memset into "bzero" if no-builtin is specified.
...
llvm-svn: 56888
2008-09-30 22:05:33 +00:00
Nuno Lopes
36e7e0b190
add preserversCFG() + preservers(CallGraph)
...
llvm-svn: 56887
2008-09-30 22:04:30 +00:00
Bill Wendling
86f6fdc7e3
- Initialize "--no-builtin" to "false".
...
- Testcase for r56885.
llvm-svn: 56886
2008-09-30 21:40:30 +00:00
Bill Wendling
9ad453e943
Add the new `-no-builtin' flag. This flag is meant to mimic the GCC
...
`-fno-builtin' flag. Currently, it's used to replace "memset" with "_bzero"
instead of "__bzero" on Darwin10+. This arguably violates the meaning of this
flag, but is currently sufficient. The meaning of this flag should become more
specific over time.
llvm-svn: 56885
2008-09-30 21:22:07 +00:00
Dan Gohman
19530c810d
Move the primary fast-isel top-level comments to FastISel.cpp, where
...
they'll be a little more visible. Also, update and reword them a bit.
llvm-svn: 56877
2008-09-30 20:48:29 +00:00
Nuno Lopes
2219758606
add AU.setPreservesCFG() since this pass only adds and removes function attributes
...
llvm-svn: 56868
2008-09-30 18:34:38 +00:00
Dan Gohman
5a2169ee6e
Optimize SelectionDAG's AssignTopologicalOrder even further.
...
Completely eliminate the TopOrder std::vector. Instead, sort
the AllNodes list in place. This also eliminates the need to
call AllNodes.size(), a linear-time operation, before
performing the sort.
Also, eliminate the Sources temporary std::vector, since it
essentially duplicates the sorted result as it is being
built.
This also changes the direction of the topological sort
from bottom-up to top-down. The AllNodes list starts out in
roughly top-down order, so this reduces the amount of
reordering needed. Top-down is also more convenient for
Legalize, and ISel needed only minor adjustments.
llvm-svn: 56867
2008-09-30 18:30:35 +00:00
Evan Cheng
7eea8fb7cd
Add runStaticConstructorsDestructors which runs ctors / dtors of a single module. Patch by David Chisnall.
...
llvm-svn: 56849
2008-09-30 15:51:21 +00:00
Evan Cheng
1c8ff02eeb
Re-apply 56835 along with header file changes.
...
llvm-svn: 56848
2008-09-30 15:44:16 +00:00
Duncan Sands
a2c8482495
Revert commit 56835 since it breaks the build.
...
"If a re-materializable instruction has a register
operand, the spiller will change the register operand's
spill weight to HUGE_VAL to avoid it being spilled.
However, if the operand is already in the queue ready
to be spilled, avoid re-materializing it".
llvm-svn: 56837
2008-09-30 10:00:30 +00:00
Evan Cheng
4eee17f4fb
If a re-materializable instruction has a register operand, the spiller will change the register operand's spill weight to HUGE_VAL to avoid it being spilled. However, if the operand is already in the queue ready to be spilled, avoid re-materializing it.
...
llvm-svn: 56835
2008-09-30 06:36:58 +00:00
Nick Lewycky
9e918179c8
Fix misoptimization of: xor i1 (icmp eq (X, C1), icmp s[lg]t (X, C2))
...
llvm-svn: 56834
2008-09-30 06:08:34 +00:00
Dan Gohman
b5824675e4
Fix X86FastISel's output for x86-32 PIC constant pool addresses.
...
llvm-svn: 56829
2008-09-30 01:21:32 +00:00
Dan Gohman
c28f40a821
Move the GlobalBaseReg field out of X86ISelDAGToDAG.cpp
...
and X86FastISel.cpp into X86MachineFunction.h, so that it
can be shared, instead of having each selector keep track
of its own.
llvm-svn: 56825
2008-09-30 00:58:23 +00:00
Dan Gohman
e76be890c9
Disable all x87 usage, including f32 and f64 when the subtarget
...
doesn't have SSE(2), with X86FastISel.
llvm-svn: 56823
2008-09-30 00:48:39 +00:00
Dale Johannesen
52987eab6e
Remove misuse of ReplaceNodeResults for atomics with
...
valid types. No functional change.
llvm-svn: 56808
2008-09-29 22:25:26 +00:00
Dan Gohman
f78676d0b6
Fix FastISel to not initialize the PIC-base register multiple times
...
in functions with PIC references from more than one basic block.
llvm-svn: 56807
2008-09-29 21:55:50 +00:00
Dan Gohman
c6184c4473
Fix an over-pessimization about GlobalVariable addresses in X86FastISel.
...
llvm-svn: 56802
2008-09-29 21:13:15 +00:00
Devang Patel
7536edca09
Support inreg, zext and sext as return value attributes.
...
llvm-svn: 56801
2008-09-29 20:49:50 +00:00
Evan Cheng
b749199c34
Fix PR2835. Do not change the width of a volatile load.
...
llvm-svn: 56792
2008-09-29 17:26:18 +00:00
Duncan Sands
187322048e
Speed up these passes when the callgraph has
...
huge simply connected components. Suggested
by Chris.
llvm-svn: 56787
2008-09-29 14:59:04 +00:00
Nuno Lopes
a4d69747c1
remove redundant test (mayBeOverriden() includes hasLinkOnceLinkage)
...
llvm-svn: 56786
2008-09-29 14:40:32 +00:00
Duncan Sands
60dc0b5cbe
Tweak some comments.
...
llvm-svn: 56784
2008-09-29 13:35:31 +00:00
Duncan Sands
651eeb4be2
Rename isWeakForLinker to mayBeOverridden. Use it
...
instead of hasWeakLinkage in a bunch of optimization
passes.
llvm-svn: 56782
2008-09-29 11:25:42 +00:00
Evan Cheng
28d9b3a8ad
Re-apply 56683 with fixes.
...
llvm-svn: 56748
2008-09-27 01:56:22 +00:00
Daniel Dunbar
dc1d75b1b5
Unbreak build.
...
llvm-svn: 56727
2008-09-27 00:22:09 +00:00
Devang Patel
47a504c87c
Implement function notes as function attributes.
...
llvm-svn: 56716
2008-09-26 23:51:19 +00:00
Dale Johannesen
54cc5b6eee
Generated files for warning fix.
...
llvm-svn: 56715
2008-09-26 23:46:20 +00:00
Dale Johannesen
96018ccd87
Fix a compiler warning.
...
llvm-svn: 56714
2008-09-26 23:45:53 +00:00
Evan Cheng
d63fc80c1e
Implement "punpckldq %xmm0, $xmm0" as "pshufd $0x50, %xmm0, %xmm" unless optimizing for code size.
...
llvm-svn: 56711
2008-09-26 23:41:32 +00:00
Devang Patel
e4e6ea0728
Now Attributes are divided in three groups
...
- return attributes - inreg, zext and sext
- parameter attributes
- function attributes - nounwind, readonly, readnone, noreturn
Return attributes use 0 as the index.
Function attributes use ~0U as the index.
This patch requires corresponding changes in llvm-gcc and clang.
llvm-svn: 56704
2008-09-26 22:53:05 +00:00
Bill Wendling
7273078850
Temporarily reverting r56683. This is causing a failure during the build of llvm-gcc:
...
/Volumes/Gir/devel/llvm/clean/llvm-gcc.obj/./gcc/xgcc -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.obj/./gcc/ -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/bin/ -B/Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/lib/ -isystem /Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/include -isystem /Volumes/Gir/devel/llvm/clean/llvm-gcc.install/i386-apple-darwin9.5.0/sys-include -mmacosx-version-min=10.4 -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -fPIC -pipe -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Gir/devel/llvm/clean/llvm.obj/include -I/Volumes/Gir/devel/llvm/clean/llvm.src/include -fexceptions -fvisibility=hidden -DHIDE_EXPORTS -c ../../llvm-gcc.src/gcc/unwind-dw2-fde-darwin.c -o libgcc/./unwind-dw2-fde-darwin.o
Assertion failed: (TargetRegisterInfo::isVirtualRegister(regA) && TargetRegisterInfo::isVirtualRegister(regB) && "cannot update physical register live information"), function runOnMachineFunction, file /Volumes/Gir/devel/llvm/clean/llvm.src/lib/CodeGen/TwoAddressInstructionPass.cpp, line 311.
../../llvm-gcc.src/gcc/unwind-dw2.c:1527: internal compiler error: Abort trap
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter > for instructions.
{standard input}:3521:non-relocatable subtraction expression, "_dwarf_reg_size_table" minus "L20$pb"
{standard input}:3521:symbol: "_dwarf_reg_size_table" can't be undefined in a subtraction expression
{standard input}:3520:non-relocatable subtraction expression, "_dwarf_reg_size_table" minus "L20$pb"
...
llvm-svn: 56703
2008-09-26 22:10:44 +00:00
Dan Gohman
a9e963a0b4
Fix missing whitespace in the printing of function notes.
...
llvm-svn: 56702
2008-09-26 22:02:59 +00:00
Dan Gohman
989db64c93
Rename ConstantSDNode's getSignExtended to getSExtValue, for
...
consistancy with ConstantInt, and re-implement it in terms
of ConstantInt's getSExtValue.
llvm-svn: 56700
2008-09-26 21:54:37 +00:00
Dan Gohman
3bcb327e9c
Mark lea fi# as being really rematerializable.
...
llvm-svn: 56698
2008-09-26 21:30:20 +00:00
Evan Cheng
5ce14d532c
unpckhps requires sse1, punpckhdq requires sse2.
...
llvm-svn: 56697
2008-09-26 21:26:30 +00:00
Dan Gohman
401470e0c7
Fix X86FastISel's address folding to check displacement
...
values for overflow.
llvm-svn: 56686
2008-09-26 20:04:15 +00:00
Evan Cheng
9946443460
Fix @llvm.frameaddress codegen. FP elimination optimization should be disabled when frame address is desired. Also add support for depth > 0.
...
llvm-svn: 56683
2008-09-26 19:48:35 +00:00
Oscar Fuentes
94d058ba4a
CMake: Builds all examples. Corrected name of CBackend target.
...
llvm-svn: 56682
2008-09-26 19:48:03 +00:00
Dale Johannesen
9ce0f3e4b3
Generated files for previous patch.
...
llvm-svn: 56679
2008-09-26 19:32:34 +00:00
Dale Johannesen
423053d8a7
Another file I forgot.
...
llvm-svn: 56678
2008-09-26 19:31:53 +00:00
Dale Johannesen
3f62c40108
Add "inreg" field to CallSDNode (doesn't increase
...
its size). Adjust various lowering functions to
pass this info through from CallInst. Use it to
implement sseregparm returns on X86. Remove
X86_ssecall calling convention.
llvm-svn: 56677
2008-09-26 19:31:26 +00:00
Dan Gohman
56b0c33a9d
Factor out the code for determining when symblic addresses
...
require RIP-relative addressing and use it to fix a bug
in X86FastISel in x86-64 PIC mode, where it was trying to
use base/index registers with RIP-relative addresses. This
fixes a bunch of x86-64 testsuite failures.
llvm-svn: 56676
2008-09-26 19:15:30 +00:00
Evan Cheng
b4d6625c85
Avoid spilling EBP / RBP twice in the prologue.
...
llvm-svn: 56675
2008-09-26 19:14:21 +00:00
Owen Anderson
70a6539add
We don't need to insert copies for implicit_def's.
...
llvm-svn: 56674
2008-09-26 18:50:46 +00:00
Evan Cheng
0d612aad67
X86 address displacement field must be interpreted as a 32-bit value.
...
llvm-svn: 56665
2008-09-26 16:58:16 +00:00
Oscar Fuentes
65859a84d0
CMake: Builds all targets.
...
llvm-svn: 56641
2008-09-26 04:40:32 +00:00
Dan Gohman
37bd5a0d40
Disable support for x86_f80 in X86FastISel. Supporting it would
...
require more work.
llvm-svn: 56637
2008-09-26 01:39:32 +00:00
Bill Wendling
bf75299f0a
If we have a function with an unreachable statement such that the ending debug
...
information is in an unreachable block, then it's possible that the high/low pc
values won't be set for the dwarf information. E.g., this function:
void abort(void) __attribute__((__noreturn__));
void dead_beef(void) __attribute__ ((noreturn));
int *b;
void dead_beef(void) {
*b=0xdeadbeef;
abort();
}
has a call to "@llvm.dbg.region.end" only in the unreachable block:
define void @dead_beef() noreturn nounwind {
entry:
call void @llvm.dbg.func.start(...)
call void @llvm.dbg.stoppoint(...)
...
call void @abort( ) noreturn nounwind
unreachable
return: ; No predecessors!
call void @llvm.dbg.stoppoint(...)
call void @llvm.dbg.region.end(...)
ret void
}
The dwarf information emitted is something like:
0x00000084: TAG_subprogram [5]
AT_name( "dead_beef" )
AT_external( 0x01 )
AT_prototyped( 0x01 )
AT_decl_file( 0x01 )
AT_decl_line( 0x08 )
Note that this is *not* the best fix for this problem, but a band-aid for an
gaping wound. This code needs to be changed when we revamp our debugging
information.
llvm-svn: 56628
2008-09-26 00:28:12 +00:00
Evan Cheng
c8674dcfd0
Prefer movlhps over punpcklqdq, etc. in more cases.
...
llvm-svn: 56627
2008-09-25 23:35:16 +00:00
Dan Gohman
524c506db3
Fix a bug in which address displacements were being added to the
...
load from the stub, instead of the result of the load from the stub.
llvm-svn: 56626
2008-09-25 23:34:02 +00:00
Bill Wendling
8b4fecfb09
Make pointer parameter const for isUsedInBasicBlock.
...
llvm-svn: 56625
2008-09-25 22:42:01 +00:00
Devang Patel
64dd7a2e89
Large mechanical patch.
...
s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g
This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.
This requires corresponding changes in llvm-gcc and clang.
llvm-svn: 56622
2008-09-25 21:00:45 +00:00
Anton Korobeynikov
7367de00cf
Reapply 56585:56589 with proper fix for some gcc versions
...
llvm-svn: 56621
2008-09-25 21:00:33 +00:00
Evan Cheng
d190aeb62d
With sse3 and when the source is a load or has multiple uses, favors movddup over shuffp*, pshufd, etc. Without sse3 or when the source is from a register, make use of movlhps
...
llvm-svn: 56620
2008-09-25 20:50:48 +00:00
Dale Johannesen
62f64ab4c8
Accept 'inreg' attribute on x86 functions as
...
meaning sse_regparm (i.e. float/double values go
in XMM0 instead of ST0). Update documentation
to reflect reality.
llvm-svn: 56619
2008-09-25 20:47:45 +00:00
Dan Gohman
f03be3916e
Avoid a spurious extra space character when printing empty structs.
...
llvm-svn: 56616
2008-09-25 17:37:20 +00:00
Dan Gohman
9bb92ce6e9
Support for i1 XOR in FastISel. It is actually safe because
...
i1 operands are assumed to already by zero-extended.
llvm-svn: 56615
2008-09-25 17:22:52 +00:00
Dan Gohman
51cd436ad8
Don't print fast-isel debug messages by default. Thanks Chris!
...
llvm-svn: 56614
2008-09-25 17:21:42 +00:00
Dan Gohman
5ee9d9af7f
Don't forget the newline in debug output.
...
llvm-svn: 56613
2008-09-25 17:17:27 +00:00
Dan Gohman
b63e6de501
FastISel support for debug info.
...
llvm-svn: 56610
2008-09-25 17:05:24 +00:00
Richard Pennington
1db9263b05
bug 2812: Segmentation fault on a big emdiam processor.
...
llvm-svn: 56609
2008-09-25 16:15:10 +00:00
Dan Gohman
6f5c6be90f
PIC support in X86FastISel.
...
llvm-svn: 56608
2008-09-25 15:24:26 +00:00
Evan Cheng
12a67b5226
Temporarily backing out 56585:56589 to unbreak the build.
...
llvm-svn: 56607
2008-09-25 07:38:08 +00:00
Dan Gohman
1776533304
Fix a recent fast-isel coverage regression - don't bail out before
...
giving the target a chance to materialize constants.
llvm-svn: 56605
2008-09-25 01:28:51 +00:00
Dan Gohman
ed3216739e
Enable DeadMachineInstructionElim when Fast-ISel is enabled.
...
llvm-svn: 56604
2008-09-25 01:14:49 +00:00
Dan Gohman
32c4066d62
Add debug output to this pass.
...
llvm-svn: 56602
2008-09-25 01:06:50 +00:00
Evan Cheng
d8a6a7beaa
pmovsxbq etc. requires sse4.1.
...
llvm-svn: 56600
2008-09-25 00:49:51 +00:00
Dan Gohman
57dc5e1698
Refactor the code that adds standard LLVM codegen passes into
...
a separate function, eliminating duplication between the
add-passes-for-file and add-passes-for-machine-code code.
llvm-svn: 56599
2008-09-25 00:37:07 +00:00
Evan Cheng
bac8250ba4
<rdar://problem/6234798> Assertion failed: (!OpInfo.AssignedRegs.Regs.empty() && "Couldn't allocate input reg!")
...
llvm-svn: 56597
2008-09-25 00:14:04 +00:00
Dan Gohman
4855b659d9
Give LowerSubregs.cpp a top-level description.
...
llvm-svn: 56596
2008-09-24 23:44:12 +00:00
Evan Cheng
efd1f614ff
Fix patterns for SSE4.1 move and sign extend instructions. Also add instructions which fold VZEXT_MOVL and VZEXT_LOAD.
...
llvm-svn: 56594
2008-09-24 23:27:55 +00:00
Evan Cheng
1d0ed88bf9
X86ISD::VZEXT_LOAD should produce and fold a chain.
...
llvm-svn: 56593
2008-09-24 23:26:36 +00:00
Dale Johannesen
4184c23365
Remove SelectionDag early allocation of registers
...
for earlyclobbers. Teach Local RA about earlyclobber,
and add some tests for it.
llvm-svn: 56592
2008-09-24 23:13:09 +00:00
Anton Korobeynikov
ff74ae04b1
Minor cleanup
...
llvm-svn: 56588
2008-09-24 22:22:54 +00:00