Commit Graph

25268 Commits

Author SHA1 Message Date
Daniel Dunbar
76dea9547d Prevent assert when using '"' in names (via hexadecimal).
Update LangRef to mention \xx quoting in names.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57538 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 23:51:43 +00:00
Daniel Dunbar
cad3580e99 Change getLLVMName to use raw_ostream & PrintLLVMName.
- Avoids duplicated quotification code.
 - Remove QuoteNameIfNeeded.
 - No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57537 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 23:28:09 +00:00
Dale Johannesen
2194d46624 Accept -march=i586, because gcc does (a synonym
for pentium).  Fixes
gcc.target/i386/20000720-1.c
gcc.target/i386/pr26826.c



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57528 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 22:06:33 +00:00
Evan Cheng
0329466b6b Rename LoadX to LoadExt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57526 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 21:26:46 +00:00
Jim Grosbach
2642196a65 Update ARM Insn encoding to get endian-ness to match the documentation (31-0 left to right)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57524 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 20:36:24 +00:00
Dan Gohman
b8cab9227a 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57521 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 20:25:08 +00:00
Evan Cheng
403006205f Combine (fcmp cc0 x, y) | (fcmp cc1 x, y) into a single fcmp when possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57515 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 18:44:08 +00:00
Evan Cheng
4990b257dd - Somehow I forgot about one / une.
- Renumber fcmp predicates to match their icmp counterparts.
- Try swapping operands to expose more optimization opportunities.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57513 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 18:13:38 +00:00
Evan Cheng
552e3be775 Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57508 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 17:15:39 +00:00
Evan Cheng
8db90725cb 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57507 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 17:15:11 +00:00
Nuno Lopes
c8ed902298 little optimization: reuse getPointerToGlobalIfAvailable(CGV) value in emitGlobals()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57484 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-14 10:04:52 +00:00
Dan Gohman
7b8e96401c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57465 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 20:52:04 +00:00
Evan Cheng
efa533957d FIX PR2794. Make sure SIGN_EXTEND_INREG nodes introduced by LegalizeSetCCOperands are leglized. Patch by Richard Pennington.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57460 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 18:46:18 +00:00
Evan Cheng
195cd3a58d Also update sub-register intervals after a trivial computation is rematt'ed for a copy instruction. PR2775.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57458 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 18:35:52 +00:00
Matthijs Kooijman
7e6d9b96ad Make InstructionCombining::getBitCastOperand() recognize GEP instructions and
constant expression with all zero indices as being the same as a bitcast.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57442 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 15:17:01 +00:00
Matthijs Kooijman
d9d07780ff * Make TargetLowering not crash when TargetMachine::getTargetAsmInfo() returns
null. This assumes that any target that does not have AsmInfo, does not
   support "LocAndDot".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57438 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 12:41:46 +00:00
Matthijs Kooijman
e2b997b7b5 Make MachineFunction not crash when TargetMachine::getRegisterInfo() returns
NULL, but just hide some debug output then.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57437 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 12:37:16 +00:00
Gabor Greif
e9324f3605 do not use deprecated interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57433 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 10:21:17 +00:00
Nick Lewycky
cb8f1b5b8b 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57431 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 03:58:02 +00:00
Chris Lattner
44d2a983b7 calls can be supported.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57428 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-13 01:59:13 +00:00
Dale Johannesen
51b7f8268b Change TAG_ names to DW_TAG for gcc (testsuite) compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57425 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12 21:23:01 +00:00
Owen Anderson
d55fccde4c Fix a bug in live-in detection that caused lost-copy problems to show up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57424 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12 20:39:30 +00:00
Anton Korobeynikov
d21a6305ea Update size of inst correctly with segment override.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57414 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12 10:30:11 +00:00
Owen Anderson
b5cf048fdf Add special-case code to allow null-guards on calls to malloc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57413 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12 08:10:46 +00:00
Owen Anderson
4b089929b4 Make Escape Analysis work for any pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57412 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12 07:33:29 +00:00
Dale Johannesen
ba0fb07156 Change Dwarf comments starting with AT_ to DW_AT_ to
match gcc.  Helps with the testsuite.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57410 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12 06:20:47 +00:00
Owen Anderson
5efff7735d Fix crashes and infinite loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57408 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12 06:03:38 +00:00
Owen Anderson
4382f62a05 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57400 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-12 03:59:45 +00:00
Chris Lattner
99cbdff66c fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57388 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-11 23:59:03 +00:00
Chris Lattner
a6321b40c2 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!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57387 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-11 22:55:00 +00:00
Chris Lattner
e563bbc312 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57385 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-11 22:08:30 +00:00
Chris Lattner
119c30b955 rearrange some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57384 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-11 22:07:19 +00:00
Duncan Sands
a4bb48adc3 Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57381 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-11 19:34:24 +00:00
Anton Korobeynikov
ef93cecd80 Add ability to override segment (mostly for code emitter purposes).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57380 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-11 19:09:15 +00:00
Daniel Dunbar
ce91ec285d Unbreak DbgStopPointInst::getFileName().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57373 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-11 06:40:56 +00:00
Chris Lattner
3c26101669 simplify comparison
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57371 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-11 00:08:02 +00:00
Dale Johannesen
e397acce9d 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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57370 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 23:51:03 +00:00
Devang Patel
fc19fbd2ca Check loop exit predicate properly while eliminating one iteration loop.
This patch fixes PR 2869


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57369 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 22:02:57 +00:00
Anton Korobeynikov
875314bb52 Fix a thinko and unbreak sparc default CC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57368 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 21:47:37 +00:00
Dale Johannesen
8b1e054938 Remove some overzealous checks that were rejecting
valid comments in inline assembly.
gcc.target/i386/20011009-1.c



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57365 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 21:04:42 +00:00
Anton Korobeynikov
df75bbae94 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57364 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 20:30:14 +00:00
Anton Korobeynikov
4cf5e2eb6c Ignore extra 'r' modifier for now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57363 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 20:29:50 +00:00
Anton Korobeynikov
4b58b6a5b4 Use expand for smul_lohi for now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57362 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 20:29:31 +00:00
Anton Korobeynikov
0eefda1335 Add rudimentary support for 'r' register operand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57359 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 20:28:10 +00:00
Anton Korobeynikov
53835708e1 Cleanup
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57358 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 20:27:31 +00:00
Oscar Fuentes
fc62ffc154 CMake: updated lib/Analysis/CMakeLists.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57357 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 18:51:36 +00:00
Mon P Wang
77fcca845e Revert r57340 move guard mutex in getPointerToFunction as this can cause
deadlock issues with java


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57356 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 18:07:10 +00:00
Nuno Lopes
7cdd9ee088 fix memleak by cleaning the global sets on pass exit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57353 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 16:25:50 +00:00
Anton Korobeynikov
f369330c2d Add rudimentary asmprinter support for printing inline asm operands for sparc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57346 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 10:15:03 +00:00
Anton Korobeynikov
2fcfd83cb4 Add dummy 'm' inline asm constraint handler for Sparc. I'm not sure, whether it is correct, however :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57345 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-10 10:14:47 +00:00