oota-llvm.git
14 years agoAdd DebugInfoEnumerator to collect debug info.
Devang Patel [Tue, 28 Jul 2009 19:55:13 +0000 (19:55 +0000)]
Add DebugInfoEnumerator to collect debug info.

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

14 years agoSimplify LDA-internal interface.
Andreas Bolka [Tue, 28 Jul 2009 19:50:13 +0000 (19:50 +0000)]
Simplify LDA-internal interface.

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

14 years agoAdd LDA statistics.
Andreas Bolka [Tue, 28 Jul 2009 19:49:49 +0000 (19:49 +0000)]
Add LDA statistics.

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

14 years agoMinor factoring, naming and formatting cleanups.
Andreas Bolka [Tue, 28 Jul 2009 19:49:25 +0000 (19:49 +0000)]
Minor factoring, naming and formatting cleanups.

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

14 years agoHandle null and file symbol on doInitialization
Bruno Cardoso Lopes [Tue, 28 Jul 2009 19:25:33 +0000 (19:25 +0000)]
Handle null and file symbol on doInitialization

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

14 years agomore simplifications and cleanup. :)
Chris Lattner [Tue, 28 Jul 2009 18:48:43 +0000 (18:48 +0000)]
more simplifications and cleanup. :)

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

14 years agoChange ConstantArray to 2.5 API.
Owen Anderson [Tue, 28 Jul 2009 18:32:17 +0000 (18:32 +0000)]
Change ConstantArray to 2.5 API.

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

14 years agoSwitch X86 assembly parser to using the generic lexer interface.
Daniel Dunbar [Tue, 28 Jul 2009 18:17:26 +0000 (18:17 +0000)]
Switch X86 assembly parser to using the generic lexer interface.

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

14 years agoAdd workaround for <rdar://problem/7098328>.
David Goodwin [Tue, 28 Jul 2009 18:15:38 +0000 (18:15 +0000)]
Add workaround for <rdar://problem/7098328>.

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

14 years agofix testcase for previous patch.
Chris Lattner [Tue, 28 Jul 2009 18:04:18 +0000 (18:04 +0000)]
fix testcase for previous patch.

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

14 years agoExpose Tokens to target specific assembly parsers.
Daniel Dunbar [Tue, 28 Jul 2009 17:58:44 +0000 (17:58 +0000)]
Expose Tokens to target specific assembly parsers.

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

14 years agoFix PR4639, a ELF-TLS regression from some of my refactoring.
Chris Lattner [Tue, 28 Jul 2009 17:57:51 +0000 (17:57 +0000)]
Fix PR4639, a ELF-TLS regression from some of my refactoring.

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

14 years agothe apple "ld_classic" linker doesn't support .literal16 in 32-bit
Chris Lattner [Tue, 28 Jul 2009 17:50:28 +0000 (17:50 +0000)]
the apple "ld_classic" linker doesn't support .literal16 in 32-bit
mode, and "ld64" (the default linker) falls back to it in -static
mode.

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

14 years agoTweak LLVM emacs style to make default namespace indentation closer to style
Daniel Dunbar [Tue, 28 Jul 2009 17:34:57 +0000 (17:34 +0000)]
Tweak LLVM emacs style to make default namespace indentation closer to style
guide.

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

14 years agoAdd Thumb-2 patterns for ARMsrl_flag and ARMsra_flag.
David Goodwin [Tue, 28 Jul 2009 17:06:49 +0000 (17:06 +0000)]
Add Thumb-2 patterns for ARMsrl_flag and ARMsra_flag.

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

14 years agoSwitch AsmLexer::Lex to returning a reference to the current token.
Daniel Dunbar [Tue, 28 Jul 2009 16:56:42 +0000 (16:56 +0000)]
Switch AsmLexer::Lex to returning a reference to the current token.

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

14 years agoAdd reload and remat backscheduling. This is disabled by default. Use
David Greene [Tue, 28 Jul 2009 16:49:24 +0000 (16:49 +0000)]
Add reload and remat backscheduling.  This is disabled by default.  Use
-schedule-spills=true to enable.

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

14 years agofix unused variable warning
Chris Lattner [Tue, 28 Jul 2009 16:49:19 +0000 (16:49 +0000)]
fix unused variable warning

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

14 years agoDrop some AsmLexer methods in favor of their AsmToken equivalents.
Daniel Dunbar [Tue, 28 Jul 2009 16:38:40 +0000 (16:38 +0000)]
Drop some AsmLexer methods in favor of their AsmToken equivalents.

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

14 years agollvm-mc: Sink token enum into AsmToken.
Daniel Dunbar [Tue, 28 Jul 2009 16:08:33 +0000 (16:08 +0000)]
llvm-mc: Sink token enum into AsmToken.

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

14 years agoInclude cmath/math.h in DataTypes.h regardless of whether MSVC is being used.
Stefanus Du Toit [Tue, 28 Jul 2009 13:41:07 +0000 (13:41 +0000)]
Include cmath/math.h in DataTypes.h regardless of whether MSVC is being used.

Fixes MSVC build of LiveInterval.cpp.

Patch by Nicolas Capens.

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

14 years agotADDrSPI doesn't have a predicate operand, but tADDhirr and tADDi3 have.
Evan Cheng [Tue, 28 Jul 2009 07:38:35 +0000 (07:38 +0000)]
tADDrSPI doesn't have a predicate operand, but tADDhirr and tADDi3 have.

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

14 years agoRemove memory corruption bug. string.c_str() was returning a temporary that was
Nick Lewycky [Tue, 28 Jul 2009 06:53:50 +0000 (06:53 +0000)]
Remove memory corruption bug. string.c_str() was returning a temporary that was
dead before we used it.

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

14 years agoCode clean up. No functionality changes.
Evan Cheng [Tue, 28 Jul 2009 06:24:12 +0000 (06:24 +0000)]
Code clean up. No functionality changes.

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

14 years ago- More refactoring. This gets rid of all of the getOpcode calls.
Evan Cheng [Tue, 28 Jul 2009 05:48:47 +0000 (05:48 +0000)]
- More refactoring. This gets rid of all of the getOpcode calls.
- This change also makes it possible to switch between ARM / Thumb on a
  per-function basis.
- Fixed thumb2 routine which expand reg + arbitrary immediate. It was using
  using ARM so_imm logic.
- Use movw and movt to do reg + imm when profitable.
- Other code clean ups and minor optimizations.

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

14 years agofix a casting problem on the llvm-x86_64-linux tester
Chris Lattner [Tue, 28 Jul 2009 03:20:34 +0000 (03:20 +0000)]
fix a casting problem on the llvm-x86_64-linux tester

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

14 years agoRip all of the global variable lowering logic out of TargetAsmInfo. Since
Chris Lattner [Tue, 28 Jul 2009 03:13:23 +0000 (03:13 +0000)]
Rip all of the global variable lowering logic out of TargetAsmInfo.  Since
it is highly specific to the object file that will be generated in the end,
this introduces a new TargetLoweringObjectFile interface that is implemented
for each of ELF/MachO/COFF/Alpha/PIC16 and XCore.

Though still is still a brutal and ugly refactoring, this is a major step
towards goodness.

This patch also:
1. fixes a bunch of dangling pointer problems in the PIC16 backend.
2. disables the TargetLowering copy ctor which PIC16 was accidentally using.
3. gets us closer to xcore having its own crazy target section flags and
   pic16 not having to shadow sections with its own objects.
4. fixes wierdness where ELF targets would set CStringSection but not
   CStringSection_.  Factor the code better.
5. fixes some bugs in string lowering on ELF targets.

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

14 years agodon't copy TargetLowering.
Chris Lattner [Tue, 28 Jul 2009 03:05:40 +0000 (03:05 +0000)]
don't copy TargetLowering.

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

14 years agollvm-mc: Factor AsmToken class out of AsmLexer.
Daniel Dunbar [Tue, 28 Jul 2009 03:00:54 +0000 (03:00 +0000)]
llvm-mc: Factor AsmToken class out of AsmLexer.

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

14 years agoTeach instcombine to respect and preserve inbounds. Add inbounds
Dan Gohman [Tue, 28 Jul 2009 01:40:03 +0000 (01:40 +0000)]
Teach instcombine to respect and preserve inbounds. Add inbounds
to a few tests where it is required for the expected transformation.

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

14 years agoFix a small little typo.
Mike Stump [Tue, 28 Jul 2009 01:35:34 +0000 (01:35 +0000)]
Fix a small little typo.

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

14 years agollvm-mc: Stop uniqueing string tokens, nothing actually uses this.
Daniel Dunbar [Tue, 28 Jul 2009 00:58:50 +0000 (00:58 +0000)]
llvm-mc: Stop uniqueing string tokens, nothing actually uses this.

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

14 years agoReplace dyn_castGetElementPtr with dyn_cast<GEPOperator>.
Dan Gohman [Tue, 28 Jul 2009 00:37:50 +0000 (00:37 +0000)]
Replace dyn_castGetElementPtr with dyn_cast<GEPOperator>.

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

14 years agoGrab the LLVMContext and parent Module of SI ahead of the
Dan Gohman [Tue, 28 Jul 2009 00:37:06 +0000 (00:37 +0000)]
Grab the LLVMContext and parent Module of SI ahead of the
point where SI can get deleted. This fixes a use of free'd memory.
This fixes Externals/Povray.

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

14 years agoORN does not require (and can not have) the ".w" suffix. "Orthogonality" is a dirty...
David Goodwin [Mon, 27 Jul 2009 23:34:12 +0000 (23:34 +0000)]
ORN does not require (and can not have) the ".w" suffix. "Orthogonality" is a dirty word at ARM.

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

14 years agoFix a release-asserts warning. Debug functions should be marked used,
Mike Stump [Mon, 27 Jul 2009 23:33:34 +0000 (23:33 +0000)]
Fix a release-asserts warning.  Debug functions should be marked used,
if there are no other uses.  If people don't need this routine
anymore, if should be deleted.

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

14 years agoPass true to the Internalize parameter of createStandardLTOPasses,
Dan Gohman [Mon, 27 Jul 2009 23:23:47 +0000 (23:23 +0000)]
Pass true to the Internalize parameter of createStandardLTOPasses,
to match llvm-ld's default behavior.

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

14 years agollvm-mc: Implement .abort fully in the front end
Daniel Dunbar [Mon, 27 Jul 2009 23:20:52 +0000 (23:20 +0000)]
llvm-mc: Implement .abort fully in the front end

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

14 years agoAvoid build warnings.
Mike Stump [Mon, 27 Jul 2009 23:14:11 +0000 (23:14 +0000)]
Avoid build warnings.

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

14 years agoAdd a comment on Value explaining the current getName() behavior.
Daniel Dunbar [Mon, 27 Jul 2009 22:39:14 +0000 (22:39 +0000)]
Add a comment on Value explaining the current getName() behavior.

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

14 years agoMove ConstantStruct back to 2.5 API.
Owen Anderson [Mon, 27 Jul 2009 22:29:26 +0000 (22:29 +0000)]
Move ConstantStruct back to 2.5 API.

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

14 years agoAdd a comment about the "getelementptr null" trick.
Dan Gohman [Mon, 27 Jul 2009 21:59:50 +0000 (21:59 +0000)]
Add a comment about the "getelementptr null" trick.

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

14 years agoAdd inbounds to the polygen grammar.
Dan Gohman [Mon, 27 Jul 2009 21:55:32 +0000 (21:55 +0000)]
Add inbounds to the polygen grammar.

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

14 years agovim syntax highlighting for inbounds keyword.
Dan Gohman [Mon, 27 Jul 2009 21:54:51 +0000 (21:54 +0000)]
vim syntax highlighting for inbounds keyword.

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

14 years agoAdd a new keyword 'inbounds' for use with getelementptr. See the
Dan Gohman [Mon, 27 Jul 2009 21:53:46 +0000 (21:53 +0000)]
Add a new keyword 'inbounds' for use with getelementptr. See the
LangRef.html changes for details.

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

14 years agollvm-mc: Move AsmLexer::getCurStrVal to StringRef based API.
Daniel Dunbar [Mon, 27 Jul 2009 21:49:56 +0000 (21:49 +0000)]
llvm-mc: Move AsmLexer::getCurStrVal to StringRef based API.
 - My DFS traversal of LLVM is, at least for now, nearly complete! :)

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

14 years agoOrder unsigned before signed, for consistency.
Dan Gohman [Mon, 27 Jul 2009 21:49:34 +0000 (21:49 +0000)]
Order unsigned before signed, for consistency.

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

14 years agoUnbreak build.
Daniel Dunbar [Mon, 27 Jul 2009 21:47:07 +0000 (21:47 +0000)]
Unbreak build.

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

14 years agoMake raw_null_ostream flush its buffer in its destructor, so that
Dan Gohman [Mon, 27 Jul 2009 21:46:02 +0000 (21:46 +0000)]
Make raw_null_ostream flush its buffer in its destructor, so that
it conforms to the assertion added in r77245. This fixes a failure
in qa_override.c in clang's testsuite.

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

14 years agohoist MCContext/MCStreamer up to AsmPrinter since we're going to start creating
Chris Lattner [Mon, 27 Jul 2009 21:28:04 +0000 (21:28 +0000)]
hoist MCContext/MCStreamer up to AsmPrinter since we're going to start creating
MCSections soon instead of Section for all targets, and we need something to
own them.

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

14 years agoMove MCContext and friends to StringRef based APIs.
Daniel Dunbar [Mon, 27 Jul 2009 21:22:30 +0000 (21:22 +0000)]
Move MCContext and friends to StringRef based APIs.

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

14 years agosimplify #includes.
Chris Lattner [Mon, 27 Jul 2009 21:13:35 +0000 (21:13 +0000)]
simplify #includes.

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

14 years agoMove ConstantFP construction back to the 2.5-ish API.
Owen Anderson [Mon, 27 Jul 2009 20:59:43 +0000 (20:59 +0000)]
Move ConstantFP construction back to the 2.5-ish API.

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

14 years agoAdd an assertion check to raw_ostream's destructor to verify
Dan Gohman [Mon, 27 Jul 2009 20:49:44 +0000 (20:49 +0000)]
Add an assertion check to raw_ostream's destructor to verify
that the subclass hasn't left any pending data in the buffer.

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

14 years agoFix typo.
Andreas Bolka [Mon, 27 Jul 2009 20:37:10 +0000 (20:37 +0000)]
Fix typo.

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

14 years ago80 columns!
Devang Patel [Mon, 27 Jul 2009 20:30:05 +0000 (20:30 +0000)]
80 columns!

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

14 years agoRemove TPat. No patterns depend on just isThumb(). Must use either T1Pat (isThumb1Onl...
David Goodwin [Mon, 27 Jul 2009 19:59:26 +0000 (19:59 +0000)]
Remove TPat. No patterns depend on just isThumb(). Must use either T1Pat (isThumb1Only()) or T2Pat (is Thumb2).

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

14 years agoThanks, Bill!
Sean Callanan [Mon, 27 Jul 2009 19:45:28 +0000 (19:45 +0000)]
Thanks, Bill!

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

14 years agofix comment
Bruno Cardoso Lopes [Mon, 27 Jul 2009 19:38:38 +0000 (19:38 +0000)]
fix comment

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

14 years agoadd module identifier to the elf object file
Bruno Cardoso Lopes [Mon, 27 Jul 2009 19:32:57 +0000 (19:32 +0000)]
add module identifier to the elf object file

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

14 years agoSink getSectionPrefixForUniqueGlobal down into the TAI
Chris Lattner [Mon, 27 Jul 2009 19:14:14 +0000 (19:14 +0000)]
Sink getSectionPrefixForUniqueGlobal down into the TAI
implementations that need it, rearrange ELFTAI.

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

14 years agoremove dead code.
Chris Lattner [Mon, 27 Jul 2009 19:00:33 +0000 (19:00 +0000)]
remove dead code.

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

14 years agoHandle external symbols for ELF and add some static methods to ELFSym
Bruno Cardoso Lopes [Mon, 27 Jul 2009 18:54:47 +0000 (18:54 +0000)]
Handle external symbols for ELF and add some static methods to ELFSym

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

14 years agoMore DCE.
Evan Cheng [Mon, 27 Jul 2009 18:48:45 +0000 (18:48 +0000)]
More DCE.

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

14 years agoconvertToThreeAddress can't handle Thumb2 instructions (which don't have same address...
Evan Cheng [Mon, 27 Jul 2009 18:44:00 +0000 (18:44 +0000)]
convertToThreeAddress can't handle Thumb2 instructions (which don't have same address mode as ARM instructions).

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

14 years agoInitialize mdnNext.
Devang Patel [Mon, 27 Jul 2009 18:42:56 +0000 (18:42 +0000)]
Initialize mdnNext.

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

14 years agoGet rid of more dead code.
Evan Cheng [Mon, 27 Jul 2009 18:38:54 +0000 (18:38 +0000)]
Get rid of more dead code.

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

14 years agoMany of Daniel's fixes.
Sean Callanan [Mon, 27 Jul 2009 18:33:24 +0000 (18:33 +0000)]
Many of Daniel's fixes.

I'm returning the number of bytes actually copied so that the client has some
warning when it reads past the end of the buffer.

I'm keeping the distinction between getByte() and getBytes() for now for
subclasses that use functions like ptrace() on Linux and only have a restricted
interface.  This makes their implementation easier, and subclasses can always
write a one-line implementation of readByte() that uses their custom
readBytes().

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

14 years agoCosmetic change.
Evan Cheng [Mon, 27 Jul 2009 18:31:40 +0000 (18:31 +0000)]
Cosmetic change.

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

14 years agoClean up.
Evan Cheng [Mon, 27 Jul 2009 18:25:24 +0000 (18:25 +0000)]
Clean up.

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

14 years agoCMake configuration: find mkdtemp, mkstemp, mktemp.
Douglas Gregor [Mon, 27 Jul 2009 18:23:41 +0000 (18:23 +0000)]
CMake configuration: find mkdtemp, mkstemp, mktemp.

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

14 years agoGet rid of some more getOpcode calls.
Evan Cheng [Mon, 27 Jul 2009 18:20:05 +0000 (18:20 +0000)]
Get rid of some more getOpcode calls.

This also fixes potential problems in ARMBaseInstrInfo routines not recognizing thumb1 instructions when 32-bit and 16-bit instructions mix.

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

14 years agoFix build.
Mike Stump [Mon, 27 Jul 2009 18:18:30 +0000 (18:18 +0000)]
Fix build.

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

14 years agoFollowing discussion on llvm-dev ("proposed new rule for getelementptr"),
Dan Gohman [Mon, 27 Jul 2009 18:07:55 +0000 (18:07 +0000)]
Following discussion on llvm-dev ("proposed new rule for getelementptr"),
add a new "Pointer Aliasing Rules" section.

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

14 years agoRemove duplicate entries while printing decls for external symbols.
Sanjiv Gupta [Mon, 27 Jul 2009 18:04:34 +0000 (18:04 +0000)]
Remove duplicate entries while printing decls for external symbols.
Some libcall names are same, so they were getting printed twice.

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

14 years agoCMake: make sure that the *.inc files for libSystem show up in the resulting
Douglas Gregor [Mon, 27 Jul 2009 17:55:55 +0000 (17:55 +0000)]
CMake: make sure that the *.inc files for libSystem show up in the resulting
project.

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

14 years agoadd an explanatory comment about why we drop these in readonly and
Chris Lattner [Mon, 27 Jul 2009 17:39:40 +0000 (17:39 +0000)]
add an explanatory comment about why we drop these in readonly and
not in mergable

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

14 years agoDo not seed mstadata into the value map.
Devang Patel [Mon, 27 Jul 2009 17:17:04 +0000 (17:17 +0000)]
Do not seed mstadata into the value map.

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

14 years agomake COFF work like ELF and macho, by splitting out into its own
Chris Lattner [Mon, 27 Jul 2009 16:45:59 +0000 (16:45 +0000)]
make COFF work like ELF and macho, by splitting out into its own
header even though there is only one COFF target.

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

14 years agodon't create default text/data sections for all targets.
Chris Lattner [Mon, 27 Jul 2009 16:44:04 +0000 (16:44 +0000)]
don't create default text/data sections for all targets.

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

14 years agoApparently alpha doesn't use ElfTargetAsmInfo (?)
Chris Lattner [Mon, 27 Jul 2009 16:42:14 +0000 (16:42 +0000)]
Apparently alpha doesn't use ElfTargetAsmInfo (?)

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

14 years agoThumb-2 does not have RSC.
David Goodwin [Mon, 27 Jul 2009 16:39:05 +0000 (16:39 +0000)]
Thumb-2 does not have RSC.

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

14 years agoAdd ".w" suffix for wide thumb-2 instructions.
David Goodwin [Mon, 27 Jul 2009 16:31:55 +0000 (16:31 +0000)]
Add ".w" suffix for wide thumb-2 instructions.

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

14 years agoinline a method.
Chris Lattner [Mon, 27 Jul 2009 16:27:32 +0000 (16:27 +0000)]
inline a method.

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

14 years agoapparently we have "windows" and "coff", which are different(?)
Chris Lattner [Mon, 27 Jul 2009 16:22:39 +0000 (16:22 +0000)]
apparently we have "windows" and "coff", which are different(?)

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

14 years agosink text/data section creation down into the target-specific places that
Chris Lattner [Mon, 27 Jul 2009 16:20:58 +0000 (16:20 +0000)]
sink text/data section creation down into the target-specific places that
should know about them.  PECoff doesn't share these, and I want all sections
to be created by object-file-specific code.

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

14 years agoTest case to check that separate section is created for a global variable specified...
Sanjiv Gupta [Mon, 27 Jul 2009 16:20:41 +0000 (16:20 +0000)]
Test case to check that separate section is created for a global variable specified with section attribute.

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

14 years agoChange the assembly syntax for nsw, nuw, and exact, putting them
Dan Gohman [Mon, 27 Jul 2009 16:11:46 +0000 (16:11 +0000)]
Change the assembly syntax for nsw, nuw, and exact, putting them
after their associated opcodes rather than before. This makes them
a little easier to read.

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

14 years agoFix wording in comments.
Dan Gohman [Mon, 27 Jul 2009 16:09:48 +0000 (16:09 +0000)]
Fix wording in comments.

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

14 years agoupdate testcase.
Chris Lattner [Mon, 27 Jul 2009 15:52:58 +0000 (15:52 +0000)]
update testcase.

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

14 years ago32-bit darwin targets support .literal16 too.
Chris Lattner [Mon, 27 Jul 2009 15:44:04 +0000 (15:44 +0000)]
32-bit darwin targets support .literal16 too.

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

14 years agoRemove trailing slashes from include paths. Some versions of mingw don't like them.
Benjamin Kramer [Mon, 27 Jul 2009 09:39:18 +0000 (09:39 +0000)]
Remove trailing slashes from include paths. Some versions of mingw don't like them.

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

14 years agoTest commit: fix typo
Benjamin Kramer [Mon, 27 Jul 2009 09:06:52 +0000 (09:06 +0000)]
Test commit: fix typo

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

14 years agoEliminate getNamed/getUnnamedSection, adding a new and unified getOrCreateSection
Chris Lattner [Mon, 27 Jul 2009 06:17:14 +0000 (06:17 +0000)]
Eliminate getNamed/getUnnamedSection, adding a new and unified getOrCreateSection
instead.

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

14 years agoEliminate SectionFlags, just embed a SectionKind into Section
Chris Lattner [Mon, 27 Jul 2009 05:32:16 +0000 (05:32 +0000)]
Eliminate SectionFlags, just embed a SectionKind into Section
instead and drive things based off of that.

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

14 years agoIf CPSR is modified but the def is dead, then it's ok to fold the load / store.
Evan Cheng [Mon, 27 Jul 2009 04:18:04 +0000 (04:18 +0000)]
If CPSR is modified but the def is dead, then it's ok to fold the load / store.

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

14 years agoUse t2LDRi12 and t2STRi12 to load / store to / from stack frames. Eliminate more...
Evan Cheng [Mon, 27 Jul 2009 03:14:20 +0000 (03:14 +0000)]
Use t2LDRi12 and t2STRi12 to load / store to / from stack frames. Eliminate more getOpcode calls.

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

14 years agoGenerate a libcall for i8 multiply.
Sanjiv Gupta [Mon, 27 Jul 2009 02:44:46 +0000 (02:44 +0000)]
Generate a libcall for i8 multiply.

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

14 years agofixed incorrect lowering of ISD::SUB node. SUB has only one result value.
Sanjiv Gupta [Mon, 27 Jul 2009 02:26:06 +0000 (02:26 +0000)]
fixed incorrect lowering of ISD::SUB node. SUB has only one result value.
It wasn't caught during tests because we never got a sub generated, (i8 was always getting promoted to int, which in turn was broken into subc/sube). Though the optimizer leaves an i8 sub now.

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

14 years agoUse the right instructions to copy between GPR and the more strictive tGPR classes...
Evan Cheng [Mon, 27 Jul 2009 00:33:08 +0000 (00:33 +0000)]
Use the right instructions to copy between GPR and the more strictive tGPR classes. t2MOV does not match the RC requirements.

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