oota-llvm.git
15 years agoFix PR4484.
Rafael Espindola [Tue, 30 Jun 2009 12:18:16 +0000 (12:18 +0000)]
Fix PR4484.
This was caused by me confounding FP0 and ST(0).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74523 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTemporarily restore the scavenger implicit_def checking code. MachineOperand isUndef...
Evan Cheng [Tue, 30 Jun 2009 09:19:42 +0000 (09:19 +0000)]
Temporarily restore the scavenger implicit_def checking code. MachineOperand isUndef mark is not being put on implicit_def of physical registers (created for parameter passing, etc.).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74519 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a bit IsUndef to MachineOperand. This indicates the def / use register operand...
Evan Cheng [Tue, 30 Jun 2009 08:49:04 +0000 (08:49 +0000)]
Add a bit IsUndef to MachineOperand. This indicates the def / use register operand is defined by an implicit_def. That means it can def / use any register and passes (e.g. register scavenger) can feel free to ignore them.

The register allocator, when it allocates a register to a virtual register defined by an implicit_def, can allocate any physical register without worrying about overlapping live ranges. It should mark all of operands of the said virtual register so later passes will do the right thing.

This is not the best solution. But it should be a lot less fragile to having the scavenger try to track what is defined by implicit_def.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74518 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTemporarily revert r74494. It was causing failures in the unit tests.
Bill Wendling [Tue, 30 Jun 2009 07:05:27 +0000 (07:05 +0000)]
Temporarily revert r74494. It was causing failures in the unit tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74515 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agogot confused again
Chris Lattner [Tue, 30 Jun 2009 06:27:54 +0000 (06:27 +0000)]
got confused again

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74514 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix some issues Jeff Yasskin noticed
Chris Lattner [Tue, 30 Jun 2009 06:20:03 +0000 (06:20 +0000)]
fix some issues Jeff Yasskin noticed

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74512 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a note about re-evaluating end() every time through a loop.
Chris Lattner [Tue, 30 Jun 2009 06:13:23 +0000 (06:13 +0000)]
add a note about re-evaluating end() every time through a loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74511 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the build on Cygwin. Patch by Aaron Gray.
Owen Anderson [Tue, 30 Jun 2009 05:33:46 +0000 (05:33 +0000)]
Fix the build on Cygwin.  Patch by Aaron Gray.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74510 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove a bogus note.
Chris Lattner [Tue, 30 Jun 2009 05:22:31 +0000 (05:22 +0000)]
remove a bogus note.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74509 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a note
Chris Lattner [Tue, 30 Jun 2009 04:20:46 +0000 (04:20 +0000)]
add a note

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74508 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago#include <iostream> is forbidden. Remove it in favor of raw_ostream.
Bill Wendling [Tue, 30 Jun 2009 04:07:12 +0000 (04:07 +0000)]
#include <iostream> is forbidden. Remove it in favor of raw_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74507 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoA few more load instructions.
Evan Cheng [Tue, 30 Jun 2009 02:15:48 +0000 (02:15 +0000)]
A few more load instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74500 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoArray accesses are independent if the underlying arrays differ.
Andreas Bolka [Tue, 30 Jun 2009 02:12:10 +0000 (02:12 +0000)]
Array accesses are independent if the underlying arrays differ.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74499 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc: Accept relocatable expressions for .org, assignments, .byte, etc.
Daniel Dunbar [Tue, 30 Jun 2009 02:10:03 +0000 (02:10 +0000)]
llvm-mc: Accept relocatable expressions for .org, assignments, .byte, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74498 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc: Rewrite binary subtraction for relocatable expressions, we can't always
Daniel Dunbar [Tue, 30 Jun 2009 02:08:27 +0000 (02:08 +0000)]
llvm-mc: Rewrite binary subtraction for relocatable expressions, we can't always
legally negate an MCValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74497 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc: Evaluation for relocatable expressions.
Daniel Dunbar [Tue, 30 Jun 2009 01:49:52 +0000 (01:49 +0000)]
llvm-mc: Evaluation for relocatable expressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74496 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDelete a spurious blank line at the top of the file.
Dan Gohman [Tue, 30 Jun 2009 01:29:09 +0000 (01:29 +0000)]
Delete a spurious blank line at the top of the file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74495 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDefine an operator<< for APInt to be used with std::ostream.
Dan Gohman [Tue, 30 Jun 2009 01:28:08 +0000 (01:28 +0000)]
Define an operator<< for APInt to be used with std::ostream.
This will allow it to be used in unittests that use gtest's
EXPECT_EQ.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74494 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMinor formatting, whitespace, and 80-column fixes.
Dan Gohman [Tue, 30 Jun 2009 01:25:30 +0000 (01:25 +0000)]
Minor formatting, whitespace, and 80-column fixes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74492 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMinor code simplification.
Dan Gohman [Tue, 30 Jun 2009 01:24:43 +0000 (01:24 +0000)]
Minor code simplification.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74491 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEnhance tests to include shifted-register operand testing.
David Goodwin [Tue, 30 Jun 2009 01:02:20 +0000 (01:02 +0000)]
Enhance tests to include shifted-register operand testing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74490 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNormalize SourceMgr messages.
Daniel Dunbar [Tue, 30 Jun 2009 00:49:23 +0000 (00:49 +0000)]
Normalize SourceMgr messages.
 - Don't print "Parsing" in front of every message.

 - Take additional "type" argument which is prepended to the message (with ": ")
   if given.

 - Update clients to print errors (warnings) as:
<filename>:<line number>: error(warning): ...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74489 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd LLVMContext, which will eventually be used as a container for privatizing a lot...
Owen Anderson [Tue, 30 Jun 2009 00:48:55 +0000 (00:48 +0000)]
Add LLVMContext, which will eventually be used as a container for privatizing a lot of (currently) global state, including the
constant and type uniquing tables.  For now, just make it a wrapper around the existing APIs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74488 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc: Parse symbol attribute directives.
Daniel Dunbar [Tue, 30 Jun 2009 00:33:19 +0000 (00:33 +0000)]
llvm-mc: Parse symbol attribute directives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74487 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRegenerate.
Mikhail Glushenkov [Tue, 30 Jun 2009 00:16:43 +0000 (00:16 +0000)]
Regenerate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74485 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClang is now production quality (at least for C).
Mikhail Glushenkov [Tue, 30 Jun 2009 00:16:22 +0000 (00:16 +0000)]
Clang is now production quality (at least for C).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74484 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a way to access argv[0] in hooks.
Mikhail Glushenkov [Tue, 30 Jun 2009 00:16:00 +0000 (00:16 +0000)]
Add a way to access argv[0] in hooks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74483 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove the driver entry point out of Main.inc.
Mikhail Glushenkov [Tue, 30 Jun 2009 00:15:24 +0000 (00:15 +0000)]
Move the driver entry point out of Main.inc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74482 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc: Parse .{,b,p2}align{,w,l} directives.
Daniel Dunbar [Mon, 29 Jun 2009 23:46:59 +0000 (23:46 +0000)]
llvm-mc: Parse .{,b,p2}align{,w,l} directives.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74478 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoStruct types are described using field types only.
Devang Patel [Mon, 29 Jun 2009 23:46:50 +0000 (23:46 +0000)]
Struct types are described using field types only.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74477 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc: Diagnose misuse (mix) of defined symbols and labels.
Daniel Dunbar [Mon, 29 Jun 2009 23:43:14 +0000 (23:43 +0000)]
llvm-mc: Diagnose misuse (mix) of defined symbols and labels.
 - For example, we diagnose errors on:
--
a:
a = 10
--

 - For now we reject code like:
--
.long a
a = 10
--
   which "as" accepts (on Darwin).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74476 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd SMLoc::isValid method.
Daniel Dunbar [Mon, 29 Jun 2009 23:28:55 +0000 (23:28 +0000)]
Add SMLoc::isValid method.
 - To support using SMLoc as a sentinel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74474 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix install of libCompilerDriver dynamic library to not copy on every build.
Daniel Dunbar [Mon, 29 Jun 2009 22:59:36 +0000 (22:59 +0000)]
Fix install of libCompilerDriver dynamic library to not copy on every build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74473 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove commented code.
David Greene [Mon, 29 Jun 2009 22:55:52 +0000 (22:55 +0000)]
Remove commented code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74471 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a 256-bit register class and YMM registers.
David Greene [Mon, 29 Jun 2009 22:50:51 +0000 (22:50 +0000)]
Add a 256-bit register class and YMM registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74469 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd Thumb-2 support for TEQ amd TST.
David Goodwin [Mon, 29 Jun 2009 22:49:42 +0000 (22:49 +0000)]
Add Thumb-2 support for TEQ amd TST.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74468 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThumb-2 tests
David Goodwin [Mon, 29 Jun 2009 22:25:22 +0000 (22:25 +0000)]
Thumb-2 tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74464 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc: Recognize C++ style comments.
Daniel Dunbar [Mon, 29 Jun 2009 22:00:57 +0000 (22:00 +0000)]
llvm-mc: Recognize C++ style comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74463 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agollvm-mc: Recognize C++ style comments.
Daniel Dunbar [Mon, 29 Jun 2009 21:58:22 +0000 (21:58 +0000)]
llvm-mc: Recognize C++ style comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74462 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse getSCEV instead of getUnknown to create a SCEV for a
Dan Gohman [Mon, 29 Jun 2009 21:31:18 +0000 (21:31 +0000)]
Use getSCEV instead of getUnknown to create a SCEV for a
Constant. This lets ConstantInts be handled as SCEVConstant instead
of SCEVUnknown, as getUnknown no longer has special-case code for
ConstantInt and friends. This usually doesn't affect the final
output, since the constants end up getting folded later, but it
does make intermediate expressions more obvious in many cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74459 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix uninitialized variable warning.
Daniel Dunbar [Mon, 29 Jun 2009 21:14:21 +0000 (21:14 +0000)]
Fix uninitialized variable warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74457 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't build LLVMC when configured with --disable-pic (it needs requires shared
Daniel Dunbar [Mon, 29 Jun 2009 21:12:26 +0000 (21:12 +0000)]
Don't build LLVMC when configured with --disable-pic (it needs requires shared
module support to build).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74456 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSet wasRun to false here on Dan's suggestion.
Torok Edwin [Mon, 29 Jun 2009 21:05:10 +0000 (21:05 +0000)]
Set wasRun to false here on Dan's suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74455 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agos/MainCU/ModuleCU/g
Devang Patel [Mon, 29 Jun 2009 20:45:18 +0000 (20:45 +0000)]
s/MainCU/ModuleCU/g

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74452 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSet some svn:ignore props
Daniel Dunbar [Mon, 29 Jun 2009 20:41:28 +0000 (20:41 +0000)]
Set some svn:ignore props

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74451 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMC: Improve expression parsing and implement evaluation of absolute expressions
Daniel Dunbar [Mon, 29 Jun 2009 20:40:36 +0000 (20:40 +0000)]
MC: Improve expression parsing and implement evaluation of absolute expressions
(missed files).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74450 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMultiple DW_TAG_compile_unit is not used, afaict, on any target.
Devang Patel [Mon, 29 Jun 2009 20:38:13 +0000 (20:38 +0000)]
Multiple DW_TAG_compile_unit is not used, afaict, on any target.

Update dwarf writer to only emit one DW_TAG_compile_unit per .o file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74449 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMC: Improve expression parsing and implement evaluation of absolute expressions.
Daniel Dunbar [Mon, 29 Jun 2009 20:37:27 +0000 (20:37 +0000)]
MC: Improve expression parsing and implement evaluation of absolute expressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74448 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't cache PHI exit values from exhaustive evaluations, because
Dan Gohman [Mon, 29 Jun 2009 20:34:13 +0000 (20:34 +0000)]
Don't cache PHI exit values from exhaustive evaluations, because
an individual exhaustive evaluation reflects only the exit value
implied by an individual exit, which may differ from the actual
exit value of the loop if there are other exits. This fixes PR4477.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74447 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFIX PR 4459.
Rafael Espindola [Mon, 29 Jun 2009 20:29:59 +0000 (20:29 +0000)]
FIX PR 4459.

Not sure I understand how the temp register gets used,
but this fixes a bug and introduces no regressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74446 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd some tests of advanced TableGen list functionality.
David Greene [Mon, 29 Jun 2009 20:07:17 +0000 (20:07 +0000)]
Add some tests of advanced TableGen list functionality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74445 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement !cast<string>.
David Greene [Mon, 29 Jun 2009 20:05:29 +0000 (20:05 +0000)]
Implement !cast<string>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74444 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImprove TableGen error reporting.
David Greene [Mon, 29 Jun 2009 19:59:52 +0000 (19:59 +0000)]
Improve TableGen error reporting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74443 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInitialize CurSection in constructor.
Torok Edwin [Mon, 29 Jun 2009 19:59:10 +0000 (19:59 +0000)]
Initialize CurSection in constructor.
Not doing so causes some unittests to fail, because CurSection is uninitialized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74442 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix order of arguments to EXPECT_EQ
Daniel Dunbar [Mon, 29 Jun 2009 19:57:24 +0000 (19:57 +0000)]
Fix order of arguments to EXPECT_EQ

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74441 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename MCValue::getCst to getConstant and add MCValue::isConstant.
Daniel Dunbar [Mon, 29 Jun 2009 19:51:00 +0000 (19:51 +0000)]
Rename MCValue::getCst to getConstant and add MCValue::isConstant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74440 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRelax LDA memory instruction checks.
Andreas Bolka [Mon, 29 Jun 2009 18:51:11 +0000 (18:51 +0000)]
Relax LDA memory instruction checks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74439 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCall doInitialization(), releaseMemory(), and doFinalization() for on-the-fly passes...
Torok Edwin [Mon, 29 Jun 2009 18:49:09 +0000 (18:49 +0000)]
Call doInitialization(), releaseMemory(), and doFinalization() for on-the-fly passes as well.
Also don't call finalizers for LoopPass if initialization was not called.
Add a unittest that tests that these methods are called, in the proper
order, and the correct number of times.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74438 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify this code, and avoid using APInt(). This fixes
Dan Gohman [Mon, 29 Jun 2009 18:25:52 +0000 (18:25 +0000)]
Simplify this code, and avoid using APInt(). This fixes
(otherwise harmless) uninitialized value warnings that
Duncan found with gcc-4.4.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74437 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a target-specific DAG combine on X86 to fold the common pattern of
Owen Anderson [Mon, 29 Jun 2009 18:04:45 +0000 (18:04 +0000)]
Add a target-specific DAG combine on X86 to fold the common pattern of
fence-atomic-fence down to just the atomic op.  This is possible thanks to
X86's relatively strong memory model, which guarantees that locked instructions
(which are used to implement atomics) are implicit fences.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74435 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix three MSVC 2008 warnings that completely clutter the build output.
Sebastian Redl [Mon, 29 Jun 2009 17:12:06 +0000 (17:12 +0000)]
Fix three MSVC 2008 warnings that completely clutter the build output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74430 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd processor descriptions for Istanbul and Shanghai.
David Greene [Mon, 29 Jun 2009 16:54:06 +0000 (16:54 +0000)]
Add processor descriptions for Istanbul and Shanghai.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74429 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a subtarget feature bug.
David Greene [Mon, 29 Jun 2009 16:51:01 +0000 (16:51 +0000)]
Fix a subtarget feature bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74428 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd more vector ValueTypes for AVX and other extended vector instruction
David Greene [Mon, 29 Jun 2009 16:47:10 +0000 (16:47 +0000)]
Add more vector ValueTypes for AVX and other extended vector instruction
sets.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74427 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix CMake checks for pthread_getspecific and pthread_rwlock_init, from Xerxes Ranby
Douglas Gregor [Mon, 29 Jun 2009 16:25:22 +0000 (16:25 +0000)]
Fix CMake checks for pthread_getspecific and pthread_rwlock_init, from Xerxes Ranby

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74426 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRename ARMcmpNZ to ARMcmpZ and use it to represent comparisons that set only the...
David Goodwin [Mon, 29 Jun 2009 15:33:01 +0000 (15:33 +0000)]
Rename ARMcmpNZ to ARMcmpZ and use it to represent comparisons that set only the Z flag (i.e. eq and ne). Make ARMcmpZ commutative.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74423 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd triple for OpenBSD.
Duncan Sands [Mon, 29 Jun 2009 13:36:13 +0000 (13:36 +0000)]
Add triple for OpenBSD.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74422 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInclude the new file ThumbRegisterInfo.cpp to CMakeLists.txt
Duncan Sands [Mon, 29 Jun 2009 13:11:32 +0000 (13:11 +0000)]
Include the new file ThumbRegisterInfo.cpp to CMakeLists.txt
to make sure ThumbRegisterInfo.cpp are compiled and linked in.
Patch by Xerxes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74421 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement Thumb2 ldr.
Evan Cheng [Mon, 29 Jun 2009 07:51:04 +0000 (07:51 +0000)]
Implement Thumb2 ldr.

After much back and forth, I decided to deviate from ARM design and split LDR into 4 instructions (r + imm12, r + imm8, r + r << imm12, constantpool). The advantage of this is 1) it follows the latest ARM technical manual, and 2) makes it easier to reduce the width of the instruction later. The down side is this creates more inconsistency between the two sub-targets. We should split ARM LDR instruction in a similar fashion later. I've added a README entry for this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74420 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake dynamic LLVMC plugins work on Windows (finally!).
Mikhail Glushenkov [Mon, 29 Jun 2009 03:09:15 +0000 (03:09 +0000)]
Make dynamic LLVMC plugins work on Windows (finally!).

Implemented by making lib/CompilerDriver a shared library that holds all the
global static data (CommandLine options, plugin registry) that we unfortunately
have to live with.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74417 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMissed one.
Andreas Bolka [Mon, 29 Jun 2009 00:53:49 +0000 (00:53 +0000)]
Missed one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74416 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix case in LDA util function names.
Andreas Bolka [Mon, 29 Jun 2009 00:50:26 +0000 (00:50 +0000)]
Fix case in LDA util function names.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74415 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPrint pairwise dependence results, add testcases.
Andreas Bolka [Sun, 28 Jun 2009 00:35:22 +0000 (00:35 +0000)]
Print pairwise dependence results, add testcases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74402 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMinimal LDA interface, maximally conservative tester.
Andreas Bolka [Sun, 28 Jun 2009 00:21:21 +0000 (00:21 +0000)]
Minimal LDA interface, maximally conservative tester.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74401 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoLDA analysis output scaffolding.
Andreas Bolka [Sun, 28 Jun 2009 00:16:08 +0000 (00:16 +0000)]
LDA analysis output scaffolding.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74400 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't try to split a loop when the controlling icmp instruction
Dan Gohman [Sat, 27 Jun 2009 22:58:27 +0000 (22:58 +0000)]
Don't try to split a loop when the controlling icmp instruction
doesn't have an IV-based operand. This fixes PR4471.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74399 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove the block from the LoopInfo, rather than just the Loop.
Dan Gohman [Sat, 27 Jun 2009 22:32:36 +0000 (22:32 +0000)]
Remove the block from the LoopInfo, rather than just the Loop.
LoopInfo will handle removing it from the Loop, as well as updating
its own tables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74398 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTeach LoopSimplify how to merge multiple loop exits into a single exit,
Dan Gohman [Sat, 27 Jun 2009 21:30:38 +0000 (21:30 +0000)]
Teach LoopSimplify how to merge multiple loop exits into a single exit,
when one of them can be converted to a trivial icmp and conditional
branch.

This addresses what is essentially a phase ordering problem.
SimplifyCFG knows how to do this transformation, but it doesn't do so
if the primary block has any instructions in it other than an icmp and
a branch. In the given testcase, the block contains other instructions,
however they are loop-invariant and can be hoisted. SimplifyCFG doesn't
have LoopInfo though, so it can't hoist them. And, it's important that
the blocks be merged before LoopRotation, as it doesn't support
multiple-exit loops.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74396 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMore minor code simplifications.
Dan Gohman [Sat, 27 Jun 2009 21:23:40 +0000 (21:23 +0000)]
More minor code simplifications.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74395 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEliminate a layer of indirection in LoopInfo and MachineLoopInfo.
Dan Gohman [Sat, 27 Jun 2009 21:22:48 +0000 (21:22 +0000)]
Eliminate a layer of indirection in LoopInfo and MachineLoopInfo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74394 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConvert ScalarEvolution to use BumpPtrAllocator and FoldingSet, instead
Dan Gohman [Sat, 27 Jun 2009 21:21:31 +0000 (21:21 +0000)]
Convert ScalarEvolution to use BumpPtrAllocator and FoldingSet, instead
of a team of individual allocations and a team of std::maps.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74393 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove a redundant #include.
Dan Gohman [Sat, 27 Jun 2009 21:18:51 +0000 (21:18 +0000)]
Remove a redundant #include.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74392 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange SCEVExpander to use an IRBuilder to emit instructions.
Dan Gohman [Sat, 27 Jun 2009 21:18:18 +0000 (21:18 +0000)]
Change SCEVExpander to use an IRBuilder to emit instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74391 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a 'const' in a comment.
Dan Gohman [Sat, 27 Jun 2009 20:53:16 +0000 (20:53 +0000)]
Add a 'const' in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74389 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSimplify a bit
Anton Korobeynikov [Sat, 27 Jun 2009 12:59:03 +0000 (12:59 +0000)]
Simplify a bit

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74385 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoARM refactoring. Step 2: split RegisterInfo
Anton Korobeynikov [Sat, 27 Jun 2009 12:16:40 +0000 (12:16 +0000)]
ARM refactoring. Step 2: split RegisterInfo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74384 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd ThumbInstrInfo.cpp to the CMake makefiles
Douglas Gregor [Sat, 27 Jun 2009 07:44:59 +0000 (07:44 +0000)]
Add ThumbInstrInfo.cpp to the CMake makefiles

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74382 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove a bunch of fixmes (old checking code) and commonize all the
Chris Lattner [Sat, 27 Jun 2009 05:46:24 +0000 (05:46 +0000)]
remove a bunch of fixmes (old checking code) and commonize all the
target-specific operand printing functionality.  Yay.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74379 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agopull @GOT, @GOTOFF, @GOTPCREL handling into isel from the asmprinter.
Chris Lattner [Sat, 27 Jun 2009 05:39:56 +0000 (05:39 +0000)]
pull @GOT, @GOTOFF, @GOTPCREL handling into isel from the asmprinter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74378 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosimplify some code and eliminate the symbolicAddressesAreRIPRel() predicate.
Chris Lattner [Sat, 27 Jun 2009 05:24:12 +0000 (05:24 +0000)]
simplify some code and eliminate the symbolicAddressesAreRIPRel() predicate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74377 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen a value is used multiple times within a single PHI, instructions
Dan Gohman [Sat, 27 Jun 2009 05:16:57 +0000 (05:16 +0000)]
When a value is used multiple times within a single PHI, instructions
inserted to replace that value must dominate all of of the basic
blocks associated with the uses of the value in the PHI, not just
one of them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74376 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix clang/test/CodeGenObjC/try.m, a basereg doesn't mean no global anymore.
Chris Lattner [Sat, 27 Jun 2009 04:50:14 +0000 (04:50 +0000)]
fix clang/test/CodeGenObjC/try.m, a basereg doesn't mean no global anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74375 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix a bunch of failures in the X86-64 JIT by tolerating RIP as
Chris Lattner [Sat, 27 Jun 2009 04:46:33 +0000 (04:46 +0000)]
fix a bunch of failures in the X86-64 JIT by tolerating RIP as
a base register.  We just ignore it for now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74374 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofactor some logic out into a helper function, allow remat of loads from constant
Chris Lattner [Sat, 27 Jun 2009 04:38:55 +0000 (04:38 +0000)]
factor some logic out into a helper function, allow remat of loads from constant
globals.  This implements remat-constant.ll even without aggressive-remat.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74373 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReimplement rip-relative addressing in the X86-64 backend. The new
Chris Lattner [Sat, 27 Jun 2009 04:16:01 +0000 (04:16 +0000)]
Reimplement rip-relative addressing in the X86-64 backend.  The new
implementation primarily differs from the former in that the asmprinter
doesn't make a zillion decisions about whether or not something will be
RIP relative or not.  Instead, those decisions are made by isel lowering
and propagated through to the asm printer.  To achieve this, we:

1. Represent RIP relative addresses by setting the base of the X86 addr
   mode to X86::RIP.
2. When ISel Lowering decides that it is safe to use RIP, it lowers to
   X86ISD::WrapperRIP.  When it is unsafe to use RIP, it lowers to
   X86ISD::Wrapper as before.
3. This removes isRIPRel from X86ISelAddressMode, representing it with
   a basereg of RIP instead.
4. The addressing mode matching logic in isel is greatly simplified.
5. The asmprinter is greatly simplified, notably the "NotRIPRel" predicate
   passed through various printoperand routines is gone now.
6. The various symbol printing routines in asmprinter now no longer infer
   when to emit (%rip), they just print the symbol.

I think this is a big improvement over the previous situation.  It does have
two small caveats though: 1. I implemented a horrible "no-rip" modifier for
the inline asm "P" constraint modifier.  This is a short term hack, there is
a much better, but more involved, solution.  2. I had to xfail an
-aggressive-remat testcase because it isn't handling the use of RIP in the
constant-pool reading instruction.  This specific test is easy to fix without
-aggressive-remat, which I intend to do next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74372 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove some unneeded eh info.
Chris Lattner [Sat, 27 Jun 2009 04:07:31 +0000 (04:07 +0000)]
remove some unneeded eh info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74371 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen doing remat, don't consider uses of non-allocatable physregs. Patch
Chris Lattner [Sat, 27 Jun 2009 04:06:41 +0000 (04:06 +0000)]
When doing remat, don't consider uses of non-allocatable physregs.  Patch
by Evan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74370 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRenaming for consistency.
Evan Cheng [Sat, 27 Jun 2009 02:26:13 +0000 (02:26 +0000)]
Renaming for consistency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74368 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agotestcase for PR4466
Chris Lattner [Sat, 27 Jun 2009 01:33:35 +0000 (01:33 +0000)]
testcase for PR4466

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74367 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR4466 by making fastisel set operand flags correctly.
Chris Lattner [Sat, 27 Jun 2009 01:31:51 +0000 (01:31 +0000)]
Fix PR4466 by making fastisel set operand flags correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74366 91177308-0d34-0410-b5e6-96231b3b80d8