oota-llvm.git
14 years agoSignificantly improve Atomic.h by pulling in code from libatomic_ops by HP. This...
Owen Anderson [Sun, 17 May 2009 04:57:54 +0000 (04:57 +0000)]
Significantly improve Atomic.h by pulling in code from libatomic_ops by HP.  This is a little outdated, but reasonably complete.

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

14 years agoRemove the volatile marker from the cas_flag typedef, fixing some warnings.
Owen Anderson [Sat, 16 May 2009 21:08:25 +0000 (21:08 +0000)]
Remove the volatile marker from the cas_flag typedef, fixing some warnings.
 It's now the client's resposibility to add it in when needed

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

14 years agoFix a missing def-flag on a Mips epilogue load.
Jakob Stoklund Olesen [Sat, 16 May 2009 07:26:06 +0000 (07:26 +0000)]
Fix a missing def-flag on a Mips epilogue load.

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

14 years agoRemember to set def-flag on register loaded from stack slot in CellSPU.
Jakob Stoklund Olesen [Sat, 16 May 2009 07:25:44 +0000 (07:25 +0000)]
Remember to set def-flag on register loaded from stack slot in CellSPU.

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

14 years agoVerify that explicit definitions in the TargetInstrDesc are matched by
Jakob Stoklund Olesen [Sat, 16 May 2009 07:25:20 +0000 (07:25 +0000)]
Verify that explicit definitions in the TargetInstrDesc are matched by
explicit register define operands.

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

14 years agoAllow redefinition of reserved registers.
Jakob Stoklund Olesen [Sat, 16 May 2009 07:24:54 +0000 (07:24 +0000)]
Allow redefinition of reserved registers.

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

14 years agoBack out the thread-safe ManagedStatic for now. Too many people have too many proble...
Owen Anderson [Sat, 16 May 2009 07:20:52 +0000 (07:20 +0000)]
Back out the thread-safe ManagedStatic for now.  Too many people have too many problems with it for the moment.

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

14 years agoPut back a bit of expensive checking logic that
Duncan Sands [Sat, 16 May 2009 04:14:29 +0000 (04:14 +0000)]
Put back a bit of expensive checking logic that
was overenthusiastically deleted in r70234.

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

14 years agoMake sure the CXXFLAGS setting is picked up by
Duncan Sands [Sat, 16 May 2009 04:00:00 +0000 (04:00 +0000)]
Make sure the CXXFLAGS setting is picked up by
the common Makefile.  Not sure why this suddenly
started causing problems.

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

14 years agoPacify gcc-4.3, which suggests explicit braces here
Duncan Sands [Sat, 16 May 2009 03:28:54 +0000 (03:28 +0000)]
Pacify gcc-4.3, which suggests explicit braces here
to avoid an ambiguous else.

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

14 years agoHelp DejaGnu avoid pipe-jam by producing less output from certain test cases.
Jakob Stoklund Olesen [Sat, 16 May 2009 00:34:42 +0000 (00:34 +0000)]
Help DejaGnu avoid pipe-jam by producing less output from certain test cases.

When a test fails with more than a pipeful of output on stdout AND stderr, one
of the DejaGnu programs blocks. The problem can be avoided by redirecting
stdout to a file.

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

14 years agoPass to verify generated machine code.
Jakob Stoklund Olesen [Sat, 16 May 2009 00:33:53 +0000 (00:33 +0000)]
Pass to verify generated machine code.

The following is checked:

* Operand counts: All explicit operands must be present.

* Register classes: All physical and virtual register operands must be
  compatible with the register class required by the instruction descriptor.

* Register live intervals: Registers must be defined only once, and must be
  defined before use.

The machine code verifier is enabled with the command-line option
'-verify-machineinstrs', or by defining the environment variable
LLVM_VERIFY_MACHINEINSTRS to the name of a file that will receive all the
verifier errors.

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

14 years agoWork around the fact that GNU libstdc++'s debug mode uses RTTI.
Jay Foad [Fri, 15 May 2009 18:13:31 +0000 (18:13 +0000)]
Work around the fact that GNU libstdc++'s debug mode uses RTTI.

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

14 years agoUnbreak mingw build
Anton Korobeynikov [Fri, 15 May 2009 11:04:52 +0000 (11:04 +0000)]
Unbreak mingw build

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

14 years agoImprove compatibility with older versions of Windows.
Owen Anderson [Fri, 15 May 2009 10:40:23 +0000 (10:40 +0000)]
Improve compatibility with older versions of Windows.

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

14 years agoSplit out the DwarfDebug module from the DwarfWriter module.
Bill Wendling [Fri, 15 May 2009 09:23:25 +0000 (09:23 +0000)]
Split out the DwarfDebug module from the DwarfWriter module.

Again, no intendtional functionality change.

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

14 years agoFactor out some common code, fix more typoes, and add a memory fence that might be...
Owen Anderson [Fri, 15 May 2009 08:22:07 +0000 (08:22 +0000)]
Factor out some common code, fix more typoes, and add a memory fence that might be needed.

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

14 years agoFix an unfortunate typo.
Owen Anderson [Fri, 15 May 2009 08:07:23 +0000 (08:07 +0000)]
Fix an unfortunate typo.

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

14 years agoMark class as hidden.
Bill Wendling [Fri, 15 May 2009 06:55:26 +0000 (06:55 +0000)]
Mark class as hidden.

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

14 years ago(Hopefully) unbreak Apple-style builds.
Owen Anderson [Fri, 15 May 2009 06:49:31 +0000 (06:49 +0000)]
(Hopefully) unbreak Apple-style builds.

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

14 years agoFix PR4210. Rewritter should track and update kills of sub-registers as well.
Evan Cheng [Fri, 15 May 2009 06:48:19 +0000 (06:48 +0000)]
Fix PR4210. Rewritter should track and update kills of sub-registers as well.

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

14 years agoDon't #include OSAtomic.h unless we really need it.
Owen Anderson [Fri, 15 May 2009 05:13:57 +0000 (05:13 +0000)]
Don't #include OSAtomic.h unless we really need it.

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

14 years agoFix warning.
Nick Lewycky [Fri, 15 May 2009 03:07:14 +0000 (03:07 +0000)]
Fix warning.

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

14 years agoAdd extra parenthesis around || statements to pacify compiler.
Nick Lewycky [Fri, 15 May 2009 03:03:14 +0000 (03:03 +0000)]
Add extra parenthesis around || statements to pacify compiler.

Also fix up some 80col violations while I'm there.

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

14 years agoMove c'tor/d'tor to top of file.
Bill Wendling [Fri, 15 May 2009 01:18:50 +0000 (01:18 +0000)]
Move c'tor/d'tor to top of file.

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

14 years agoSplit out the DwarfException class into its own file. No functionality change,
Bill Wendling [Fri, 15 May 2009 01:12:28 +0000 (01:12 +0000)]
Split out the DwarfException class into its own file. No functionality change,
though the classes have been marked with "VISIBILITY_HIDDEN".

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

14 years agoSplit out the Dwarf writer stuff into separate files. This is a much more
Bill Wendling [Fri, 15 May 2009 00:11:17 +0000 (00:11 +0000)]
Split out the Dwarf writer stuff into separate files. This is a much more
logical/sane approach to organizing all of the stuff that goes into writing out
DWARF information. Honestly? even this is too complex for what it's supposed to
be doing.

Trivia: It *looks* like there would be functionality changes, however there aren't!

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

14 years agoNow with working on Leopard!
Owen Anderson [Fri, 15 May 2009 00:01:40 +0000 (00:01 +0000)]
Now with working on Leopard!

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

14 years agoImplement !if, analogous to $(if) in GNU make.
David Greene [Thu, 14 May 2009 23:26:46 +0000 (23:26 +0000)]
Implement !if, analogous to $(if) in GNU make.

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

14 years agoReflow to fit 80-col.
Mike Stump [Thu, 14 May 2009 23:23:37 +0000 (23:23 +0000)]
Reflow to fit 80-col.

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

14 years agoReflow to fit 80-col.
Mike Stump [Thu, 14 May 2009 23:22:47 +0000 (23:22 +0000)]
Reflow to fit 80-col.

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

14 years agoFix tests to not upset DejaGNU.
David Greene [Thu, 14 May 2009 23:21:40 +0000 (23:21 +0000)]
Fix tests to not upset DejaGNU.

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

14 years agoGraduate LLVM to the big leagues by embedding a LISP processor into TableGen.
David Greene [Thu, 14 May 2009 22:38:31 +0000 (22:38 +0000)]
Graduate LLVM to the big leagues by embedding a LISP processor into TableGen.

Ok, not really, but do support some common LISP functions:

* car
* cdr
* null

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

14 years agoImplement a !foreach operator analogous to GNU make's $(foreach).
David Greene [Thu, 14 May 2009 22:23:47 +0000 (22:23 +0000)]
Implement a !foreach operator analogous to GNU make's $(foreach).
Use it on dags and lists like this:

class decls {
  string name;
}

def Decls : decls;

class B<list<string> names> : A<!foreach(Decls.name, names, !strconcat(Decls.name, ", Sr."))>;

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

14 years agoImplement a !subst operation simmilar to $(subst) in GNU make to do
David Greene [Thu, 14 May 2009 21:54:42 +0000 (21:54 +0000)]
Implement a !subst operation simmilar to $(subst) in GNU make to do
def/var/string substitution on generic pattern templates.  For example:

def Type;
def v4f32 : Type;
def TYPE : Type;

class GenType<Type t> {
  let type = !(subst TYPE, v4f32, t);
}

def TheType : GenType<TYPE>;

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

14 years agoDropped this #include by accident.
Owen Anderson [Thu, 14 May 2009 21:33:57 +0000 (21:33 +0000)]
Dropped this #include by accident.

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

14 years agoMake ManagedStatic threadsafe by using atomic operations.
Owen Anderson [Thu, 14 May 2009 21:26:50 +0000 (21:26 +0000)]
Make ManagedStatic threadsafe by using atomic operations.

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

14 years agoAdd CompareAndSwap.
Owen Anderson [Thu, 14 May 2009 21:24:15 +0000 (21:24 +0000)]
Add CompareAndSwap.

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

14 years agoImplement !cast.
David Greene [Thu, 14 May 2009 21:22:49 +0000 (21:22 +0000)]
Implement !cast.

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

14 years agoOperation Enhancements
David Greene [Thu, 14 May 2009 20:54:48 +0000 (20:54 +0000)]
Operation Enhancements

Create an OpInit class to serve as a base for all operation Inits.

Move parsing of operation constructs to separate functions and reference
from multiple places.

Add some commented out new operations.  Coming soon.

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

14 years agoFix PR4207.
David Greene [Thu, 14 May 2009 20:38:52 +0000 (20:38 +0000)]
Fix PR4207.

If we're resolving a list element access and we're given a VarInit,
return a new VarListElementInit referencing the VarInit.

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

14 years agoDown with static variables!
Owen Anderson [Thu, 14 May 2009 19:17:24 +0000 (19:17 +0000)]
Down with static variables!

Part one of many.

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

14 years agoTag blocks with DW_AT_APPLE_block.
Mike Stump [Thu, 14 May 2009 18:45:49 +0000 (18:45 +0000)]
Tag blocks with DW_AT_APPLE_block.

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

14 years agoReuse existing getUnderlyingObject instead of
Dale Johannesen [Thu, 14 May 2009 18:41:18 +0000 (18:41 +0000)]
Reuse existing getUnderlyingObject instead of
adding another copy.

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

14 years agoNon-functionality changes:
Bill Wendling [Thu, 14 May 2009 18:26:15 +0000 (18:26 +0000)]
Non-functionality changes:

- Reformatting.
- Use while() instead of do-while().
- Move simple constructors into .h file.

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

14 years agoClean up this file fixing 80-column violations, bad formatting, etc. No functionality...
Bill Wendling [Thu, 14 May 2009 18:16:46 +0000 (18:16 +0000)]
Clean up this file fixing 80-column violations, bad formatting, etc. No functionality change.

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

14 years agoRevert r71744. I must not have understood this correctly, because the
Bob Wilson [Thu, 14 May 2009 18:08:41 +0000 (18:08 +0000)]
Revert r71744.  I must not have understood this correctly, because the
assertion is failing for some tests.

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

14 years agoUse abs64 in one more place.
Dale Johannesen [Thu, 14 May 2009 16:47:34 +0000 (16:47 +0000)]
Use abs64 in one more place.

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

14 years agoclean up line-wrapping
Jim Grosbach [Thu, 14 May 2009 15:44:15 +0000 (15:44 +0000)]
clean up line-wrapping

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

14 years agoAdd an Atomic.h to the System library, for providing a platform independent API
Owen Anderson [Thu, 14 May 2009 05:54:36 +0000 (05:54 +0000)]
Add an Atomic.h to the System library, for providing a platform independent API
to low-level sync operations.

The only one present at the moment is MemoryFence(), and only for the platforms
for which I could easily discern the proper way to do it.  If your favorite platform
isn't represented, patches are welcome!

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

14 years agoFix for PR4124. Make TwoAddressFormPass::FindLastUseInMBB return the real last use.
Lang Hames [Thu, 14 May 2009 04:26:30 +0000 (04:26 +0000)]
Fix for PR4124. Make TwoAddressFormPass::FindLastUseInMBB return the real last use.

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

14 years agoUpdate the names of the exception handling sjlj instrinsics to
Jim Grosbach [Thu, 14 May 2009 00:46:35 +0000 (00:46 +0000)]
Update the names of the exception handling sjlj instrinsics to
llvm.eh.sjlj.* for better clarity as to their purpose and scope. Add
a description of llvm.eh.sjlj.setjmp to ExceptionHandling.html.
(llvm.eh.sjlj.longjmp documentation coming when that implementation is
added).

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

14 years agoAdd an assert to turn a segfault on an unsupported inline
Dan Gohman [Thu, 14 May 2009 00:30:16 +0000 (00:30 +0000)]
Add an assert to turn a segfault on an unsupported inline
asm construct into an assertion failure.

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

14 years agoAdd dumping support for DW_AT_APPLE_isa and DW_AT_APPLE_block.
Mike Stump [Thu, 14 May 2009 00:03:51 +0000 (00:03 +0000)]
Add dumping support for DW_AT_APPLE_isa and DW_AT_APPLE_block.
Radar 6867696

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

14 years agoThere's yet more ugliness (surprise!) in DebugInfo. This needs major reworking.
Bill Wendling [Wed, 13 May 2009 23:55:49 +0000 (23:55 +0000)]
There's yet more ugliness (surprise!) in DebugInfo. This needs major reworking.

Basically, there was a situation where it was getting an empty vector and doing
a .back() on that. Which isn't cool.

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

14 years agoThe IfConverter::MergeBlocks method appears to be used only to merge a basic
Bob Wilson [Wed, 13 May 2009 23:54:13 +0000 (23:54 +0000)]
The IfConverter::MergeBlocks method appears to be used only to merge a basic
block with its unique predecessor.  Change the code to assert if that is not
the case, instead of trying to handle situations where the block has
multiple predecessors.

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

14 years agoRemoving the HasBuiltinSetjmp flag and associated bits. Flagging the presence
Jim Grosbach [Wed, 13 May 2009 23:50:53 +0000 (23:50 +0000)]
Removing the HasBuiltinSetjmp flag and associated bits. Flagging the presence
of exception handling builtin sjlj targets in functions turns out not to
be necessary. Marking the intrinsic implementation in the .td file as
defining all registers is sufficient to get the context saved properly by
the containing function.

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

14 years agoRevert a portion of Dan's change r71018 that I'm convinced is wrong.
Bob Wilson [Wed, 13 May 2009 23:48:58 +0000 (23:48 +0000)]
Revert a portion of Dan's change r71018 that I'm convinced is wrong.
Dan was trying to catch the case where a basic block ends with a conditional
branch to the fall-through block.  In this case, all the instructions have
been moved out of FromBBI, leaving it empty.  It cannot end with a
conditional branch.  As the existing comment indicates, it will always fall
through to the next block.  If the block already had the next block (NBB)
listed as a successor, the preceding loop has a check for that and does not
remove it.  Thus, we need to check and add the successor only when it is
not already listed.

With Dan's change, the empty block often ends up with the fall-through
successor listed twice.  This exposed the problem in pr4195, where
CodePlacementOpt did not handle the same predecessor listed more than once.
It is also at least partially responsible for pr4202 and probably a similar
issue with Thumb branches being out of range.

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

14 years agoMerge adjacent conditional.
Bob Wilson [Wed, 13 May 2009 23:35:38 +0000 (23:35 +0000)]
Merge adjacent conditional.

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

14 years agoRemove an unused variable.
Bob Wilson [Wed, 13 May 2009 23:31:30 +0000 (23:31 +0000)]
Remove an unused variable.

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

14 years agoFix some typos and spelling and grammar, mostly in comments, but also one
Bob Wilson [Wed, 13 May 2009 23:25:24 +0000 (23:25 +0000)]
Fix some typos and spelling and grammar, mostly in comments, but also one
field name.  No functional changes.

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

14 years agoFix whitespacing (space after switch).
Mike Stump [Wed, 13 May 2009 23:23:20 +0000 (23:23 +0000)]
Fix whitespacing (space after switch).

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

14 years agoSpelling correction s/builting/builtin/ and remove trailing whitespace in a few places
Jim Grosbach [Wed, 13 May 2009 22:32:43 +0000 (22:32 +0000)]
Spelling correction s/builting/builtin/ and remove trailing whitespace in a few places

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

14 years agoAdd nounwind to this test.
Dan Gohman [Wed, 13 May 2009 22:29:12 +0000 (22:29 +0000)]
Add nounwind to this test.

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

14 years agoRemove too large testcase.
Bill Wendling [Wed, 13 May 2009 21:51:26 +0000 (21:51 +0000)]
Remove too large testcase.

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

14 years agoRun code placement optimization for targets that want it (arm and x86 for now).
Evan Cheng [Wed, 13 May 2009 21:42:09 +0000 (21:42 +0000)]
Run code placement optimization for targets that want it (arm and x86 for now).

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

14 years agoIndentation.
Evan Cheng [Wed, 13 May 2009 21:39:20 +0000 (21:39 +0000)]
Indentation.

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

14 years agoChange MachineInstrBuilder::addReg() to take a flag instead of a list of
Bill Wendling [Wed, 13 May 2009 21:33:08 +0000 (21:33 +0000)]
Change MachineInstrBuilder::addReg() to take a flag instead of a list of
booleans. This gives a better indication of what the "addReg()" is
doing. Remembering what all of those booleans mean isn't easy, especially if you
aren't spending all of your time in that code.

I took Jakob's suggestion and made it illegal to pass in "true" for the
flag. This should hopefully prevent any unintended misuse of this (by reverting
to the old way of using addReg()).

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

14 years agoHandle some additonal cases of external weak globals.
Dale Johannesen [Wed, 13 May 2009 20:55:30 +0000 (20:55 +0000)]
Handle some additonal cases of external weak globals.

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

14 years agoMove the bookkeeping of the debug scopes back to the place where it
Bill Wendling [Wed, 13 May 2009 20:33:33 +0000 (20:33 +0000)]
Move the bookkeeping of the debug scopes back to the place where it
belonged. The variable declaration stuff wasn't happy with it where it
was. Sorry that the testcase is so big. Bugpoint wasn't able to reduce it
successfully.

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

14 years agoTestcase for 71688.
Dale Johannesen [Wed, 13 May 2009 18:33:24 +0000 (18:33 +0000)]
Testcase for 71688.

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

14 years agoDon't generate a select whose operand is load of a weak
Dale Johannesen [Wed, 13 May 2009 18:25:07 +0000 (18:25 +0000)]
Don't generate a select whose operand is load of a weak
external.  These may have address 0 and are not safe
to execute unconditionally.

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

14 years agogarbage allocation is not a good idea :)
Chris Lattner [Wed, 13 May 2009 18:02:09 +0000 (18:02 +0000)]
garbage allocation is not a good idea :)

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

14 years agoPEI: rename PEI.h to PrologEpilogInserter.h to adhere to file naming standard
John Mosby [Wed, 13 May 2009 17:52:11 +0000 (17:52 +0000)]
PEI: rename PEI.h to PrologEpilogInserter.h to adhere to file naming standard

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

14 years agocalls in nothrow functions can be marked nothrow even if the callee
Chris Lattner [Wed, 13 May 2009 17:39:14 +0000 (17:39 +0000)]
calls in nothrow functions can be marked nothrow even if the callee
is not known to be nothrow.  This allows readnone/readonly functions
to be deleted even if we don't know whether the callee can throw.

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

14 years agoRun through the list of globals once and sectionize all types of globlas includeing...
Sanjiv Gupta [Wed, 13 May 2009 15:13:17 +0000 (15:13 +0000)]
Run through the list of globals once and sectionize all types of globlas includeing declarations. Later emit them from their section lists.

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

14 years agoFix typo.
Duncan Sands [Wed, 13 May 2009 13:13:18 +0000 (13:13 +0000)]
Fix typo.

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

14 years agoAvoid getting a compiler warning
Duncan Sands [Wed, 13 May 2009 12:52:44 +0000 (12:52 +0000)]
Avoid getting a compiler warning
 IVUsers.cpp: In member function ‘bool llvm::IVUsers::AddUsersIfInteresting(llvm::Instruction*)’:
 IVUsers.cpp:221: warning: ‘isSigned’ may be used uninitialized in this function
with gcc-4.3.

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

14 years agoadd IVUsers.cpp
Chris Lattner [Wed, 13 May 2009 06:28:04 +0000 (06:28 +0000)]
add IVUsers.cpp

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

14 years agoadd ShrinkWrapping.cpp
Chris Lattner [Wed, 13 May 2009 06:27:38 +0000 (06:27 +0000)]
add ShrinkWrapping.cpp

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

14 years agoFix PR4206 - crash in simplify lib calls
Chris Lattner [Wed, 13 May 2009 06:26:11 +0000 (06:26 +0000)]
Fix PR4206 - crash in simplify lib calls

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

14 years agoFix for PR4121. If TwoAddressInstructionPass removes a dead def, and the regB
Lang Hames [Wed, 13 May 2009 04:18:47 +0000 (04:18 +0000)]
Fix for PR4121. If TwoAddressInstructionPass removes a dead def, and the regB
operand was killed, the kill needs to be removed from regB's VarInfo.

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

14 years agoAdd three new helper routines, getNoopOrZeroExtend,
Dan Gohman [Wed, 13 May 2009 03:46:30 +0000 (03:46 +0000)]
Add three new helper routines, getNoopOrZeroExtend,
getNoopOrSignExtend, and getTruncateOrNoop. These are similar
to getTruncateOrZeroExtend etc., except that they assert that
the conversion is either not widening or narrowing, as
appropriate. These will be used in some upcoming fixes.

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

14 years agoAdd an int64_t variant of abs, for host environments
Dale Johannesen [Wed, 13 May 2009 00:24:22 +0000 (00:24 +0000)]
Add an int64_t variant of abs, for host environments
without one.  Use it where we were using abs on
int64_t objects.
(I strongly suspect the casts to unsigned in the
fragments in LoopStrengthReduce are not doing whatever
the original intent was, but the obvious change to
uint64_t doesn't work.  Maybe later.)

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

14 years agoAdd support for GCC compatible builtin setjmp and longjmp intrinsics. This is
Jim Grosbach [Tue, 12 May 2009 23:59:14 +0000 (23:59 +0000)]
Add support for GCC compatible builtin setjmp and longjmp intrinsics. This is
a supporting preliminary patch for GCC-compatible SjLJ exception handling. Note that these intrinsics are not designed to be invoked directly by the user, but
rather used by the front-end as target hooks for exception handling.

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

14 years agoIf header of inner loop is aligned, do not align the outer loop header. We don't...
Evan Cheng [Tue, 12 May 2009 23:58:14 +0000 (23:58 +0000)]
If header of inner loop is aligned, do not align the outer loop header. We don't want to add nops in the outer loop for the sake of aligning the inner loop.

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

14 years agoTeach TransferDeadness to delete truly dead instructions if they do not produce side...
Evan Cheng [Tue, 12 May 2009 23:07:00 +0000 (23:07 +0000)]
Teach TransferDeadness to delete truly dead instructions if they do not produce side effects.

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

14 years agoSlightly improve generated code in a degenerate case.
Dale Johannesen [Tue, 12 May 2009 22:32:29 +0000 (22:32 +0000)]
Slightly improve generated code in a degenerate case.
Should remove a warning from MSVC.

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

14 years agocorrect register class for tADDspi to GPR since the register will always be SP
Jim Grosbach [Tue, 12 May 2009 22:30:18 +0000 (22:30 +0000)]
correct register class for tADDspi to GPR since the register will always be SP

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

14 years agoMore MSVC fixes -- class/struct conflicts.
Bill Wendling [Tue, 12 May 2009 21:55:29 +0000 (21:55 +0000)]
More MSVC fixes -- class/struct conflicts.

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

14 years agoUse struct instead of class to make MCVS compile.
Bill Wendling [Tue, 12 May 2009 21:50:43 +0000 (21:50 +0000)]
Use struct instead of class to make MCVS compile.

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

14 years agoRestructure PEI code:
John Mosby [Tue, 12 May 2009 20:33:29 +0000 (20:33 +0000)]
Restructure PEI code:

- moved shrink wrapping code from PrologEpilogInserter.cpp to
  new file ShrinkWrapping.cpp.

- moved PEI pass definition into new shared header PEI.h.

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

14 years agoSwitch to using IRBuilder throughout.
Jay Foad [Tue, 12 May 2009 20:27:44 +0000 (20:27 +0000)]
Switch to using IRBuilder throughout.

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

14 years ago80 col violations.
Evan Cheng [Tue, 12 May 2009 20:17:52 +0000 (20:17 +0000)]
80 col violations.

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

14 years agoAdd nounwind.
Evan Cheng [Tue, 12 May 2009 18:35:43 +0000 (18:35 +0000)]
Add nounwind.

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

14 years agoFixed a stack slot coloring with reg bug: do not update implicit use / def when doing...
Evan Cheng [Tue, 12 May 2009 18:31:57 +0000 (18:31 +0000)]
Fixed a stack slot coloring with reg bug: do not update implicit use / def when doing forward / backward propagation.

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

14 years agoUse llvm::raw_stream instead of llvm::Streams.
Bill Wendling [Tue, 12 May 2009 18:29:42 +0000 (18:29 +0000)]
Use llvm::raw_stream instead of llvm::Streams.

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

14 years agoFix up a few minor typos in comments.
Bob Wilson [Tue, 12 May 2009 17:35:29 +0000 (17:35 +0000)]
Fix up a few minor typos in comments.

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

14 years agoFix 80-col violations and remove trailing whitespace. No functional changes.
Bob Wilson [Tue, 12 May 2009 17:09:30 +0000 (17:09 +0000)]
Fix 80-col violations and remove trailing whitespace.  No functional changes.

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

14 years agoClarify a comment.
Dan Gohman [Tue, 12 May 2009 17:08:34 +0000 (17:08 +0000)]
Clarify a comment.

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