Victor Hernandez
108d3acb43
Parse function-local metadata inside function blocks
...
llvm-svn: 93337
2010-01-13 19:34:08 +00:00
Chris Lattner
643b817d92
Use the GV version of getNameWithPrefix in TargetLoweringObjectFileCOFF::
...
SelectSectionForGlobal, unbreaking weak globals with no-name.
llvm-svn: 93336
2010-01-13 19:19:17 +00:00
Evan Cheng
af0ad65ff2
Commit some changes I had managed to lose last night while refactoring the code. Avoid change use of PHI instructions because it's not legal to insert any instructions before them.
...
This fixes PR6027.
llvm-svn: 93335
2010-01-13 19:16:39 +00:00
Chris Lattner
a9365352cf
just finish MCizing FnStubInfo which cleans it up and simplifies it.
...
llvm-svn: 93334
2010-01-13 19:13:16 +00:00
Chris Lattner
45faea454d
don't call getNameWithPrefix repeatedly and unnecesarily.
...
llvm-svn: 93333
2010-01-13 19:05:36 +00:00
Chris Lattner
9148f36e90
properly use MCSymbol to print the strings aquired from getNameWithPrefix.
...
llvm-svn: 93332
2010-01-13 19:00:57 +00:00
Benjamin Kramer
2e06b93f43
Introduce Twine::toStringRef, a variant of toVector which avoids the copy if the
...
twine can be represented as a single StringRef. Use the new methode to simplify
some twine users.
llvm-svn: 93317
2010-01-13 12:45:23 +00:00
Evan Cheng
b5499d09d1
Re-enable extension optimization pass.
...
llvm-svn: 93313
2010-01-13 08:45:40 +00:00
Chris Lattner
ede8ad45bc
upgrade and MC'ize a few uses of makeNameProper.
...
llvm-svn: 93310
2010-01-13 08:08:33 +00:00
Chris Lattner
4cd281dab1
MC'ize this a bit and upgrade APIs
...
llvm-svn: 93309
2010-01-13 08:04:24 +00:00
Chris Lattner
b0dc959e1d
add a fixme, ELF MCSection isn't quite right and weak unnamed globals are broken
...
on linux (even though they are pointless, they shouldn't ICE).
llvm-svn: 93308
2010-01-13 08:02:14 +00:00
Evan Cheng
ceb5a4e8f6
For now, avoid issuing extract_subreg to reuse lower 8-bit, it's not safe in 32-bit.
...
llvm-svn: 93307
2010-01-13 08:01:32 +00:00
Evan Cheng
957b8beaaa
Add comment; refactor; avoid pulling in DT if it's not used.
...
llvm-svn: 93306
2010-01-13 07:59:13 +00:00
Chris Lattner
f0a401fcf0
eliminate some uses of Mangler::makeNameProper.
...
llvm-svn: 93305
2010-01-13 07:56:59 +00:00
Chris Lattner
98b05e017b
don't add the \1 to the name.
...
llvm-svn: 93304
2010-01-13 07:50:21 +00:00
Chris Lattner
25d8ed3773
remove uses of deprecated functions, this generates slightly
...
different BlockAddress labels, but nothing semantically important.
Add a FIXME that BlockAddress codegen is broken if the LLVM BB has
an empty name (e.g. strip was run).
llvm-svn: 93303
2010-01-13 07:30:49 +00:00
Chris Lattner
2b630fe822
use the new form of getNameWithPrefix, not makeNameProper.
...
Among other things, this would do very weird things if the
basic block name had (e.g.) a space in it on darwin:
makeNameProper would add quotes, then the mcsymbol would
escape the quotes.
llvm-svn: 93302
2010-01-13 07:16:53 +00:00
Chris Lattner
1126534dce
add new isSingleStringRef()/getSingleStringRef() methods to twine,
...
and use them to avoid a copy of a string in getNameWithPrefix in
the common case. It seems like Value::setName and other places
should use this as well?
llvm-svn: 93301
2010-01-13 07:12:06 +00:00
Chris Lattner
33535b3250
ugh, my last patch just sped up a method and changed all the clients
...
that I want to completely eliminate. Add fixme's so I remember this
in the future, and add the missing helper that they should be upgraded
to use instead.
llvm-svn: 93300
2010-01-13 07:01:09 +00:00
Chris Lattner
209aecad0c
change Mangler::makeNameProper to return its result in a SmallVector
...
instead of returning it in an std::string. Based on this change:
1. Change TargetLoweringObjectFileCOFF::getCOFFSection to take a StringRef
2. Change a bunch of targets to call makeNameProper with a smallstring,
making several of them *much* more efficient.
3. Rewrite Mangler::makeNameProper to not build names and then prepend
prefixes, not use temporary std::strings, and to avoid other crimes.
llvm-svn: 93298
2010-01-13 06:38:18 +00:00
Chris Lattner
b252cbb04c
my mistake, Mangler::makeNameProper wants to take a twine, not a stringref!
...
llvm-svn: 93296
2010-01-13 05:02:57 +00:00
Chris Lattner
04a7ce850d
change makeNameProper to take a stringref instead of std::string.
...
llvm-svn: 93295
2010-01-13 04:55:33 +00:00
Chris Lattner
e192d377c5
give StringRef a const_iterator member.
...
llvm-svn: 93294
2010-01-13 04:50:20 +00:00
Chris Lattner
8e26d19cb3
fix assert in AsmPrinter::EmitGlobalConstantLargeInt to match reality.
...
llvm-svn: 93293
2010-01-13 04:39:46 +00:00
Chris Lattner
4581a4f03a
reduce nesting and code duplication in AsmPrinter::EmitGlobalConstantLargeInt.
...
llvm-svn: 93292
2010-01-13 04:38:16 +00:00
Chris Lattner
a32ba6d056
reduce indentation and add a fast-path to EmitGlobalConstant for 8-byte
...
integers on 64-bit systems.
llvm-svn: 93291
2010-01-13 04:34:19 +00:00
Chris Lattner
7e0c164b5e
reduce indentation and use early exits in AsmPrinter::EmitConstantValueOnly
...
llvm-svn: 93290
2010-01-13 04:29:19 +00:00
Victor Hernandez
013a91ddfe
Revert 93270 pending investigation of how stray non-constant values end up in ValueEnumerator's ValueList during WriteConstants()
...
llvm-svn: 93289
2010-01-13 03:18:30 +00:00
Evan Cheng
d7d8f6d000
Disable opt-ext pass to unbreak the build for now.
...
llvm-svn: 93286
2010-01-13 01:51:43 +00:00
Evan Cheng
7a4bac3000
Remove debug option I accidentally left in.
...
llvm-svn: 93285
2010-01-13 01:43:20 +00:00
Dale Johannesen
93e42c5435
Fix a comment.
...
llvm-svn: 93284
2010-01-13 01:39:38 +00:00
Ted Kremenek
451a965a78
Update CMake file.
...
llvm-svn: 93283
2010-01-13 01:02:47 +00:00
Jakob Stoklund Olesen
a94837dc24
Remove the JustSP single-register regclass.
...
It was only being used by instructions with the t_addrmode_sp addressing mode,
and that is pattern matched in a way that guarantees SP is used. There is
never any register allocation done from this class.
llvm-svn: 93280
2010-01-13 00:43:06 +00:00
Jeffrey Yasskin
0ad23efb0f
Try to fix the ARM and PPC buildbots. The -mattr=vector-unaligned-mem
...
flag doesn't exist there, and this is an x86 test.
llvm-svn: 93279
2010-01-13 00:31:43 +00:00
Evan Cheng
30bebff456
Add a quick pass to optimize sign / zero extension instructions. For targets where the pre-extension values are available in the subreg of the result of the extension, replace the uses of the pre-extension value with the result + extract_subreg.
...
For now, this pass is fairly conservative. It only perform the replacement when both the pre- and post- extension values are used in the block. It will miss cases where the post-extension values are live, but not used.
llvm-svn: 93278
2010-01-13 00:30:23 +00:00
Dale Johannesen
7b1a7ed330
Further progration of metadata operands. The
...
dumper doesn't really do what I want yet, but
at least it doesn't crash now.
llvm-svn: 93272
2010-01-13 00:00:24 +00:00
Victor Hernandez
fc4aefb129
Make WriteConstants() more robust against stray values in ValueEnumerator's ValueList
...
llvm-svn: 93270
2010-01-12 23:37:59 +00:00
Bob Wilson
5b562906ac
Fix a comment typo.
...
llvm-svn: 93261
2010-01-12 22:18:56 +00:00
Chris Lattner
3b96c8ae1d
use consistent tag kinds for ilist_traits
...
llvm-svn: 93259
2010-01-12 22:00:04 +00:00
Chris Lattner
573da8ac90
1) Use the new SimplifyInstructionsInBlock routine instead of the copy
...
in JT.
2) When cloning blocks for PHI or xor conditions, use
instsimplify to simplify the code as we go. This allows us to
squish common cases early in JT which opens up opportunities for
subsequent iterations, and allows it to completely simplify the
testcase.
llvm-svn: 93253
2010-01-12 20:41:47 +00:00
Chris Lattner
7c743f2c74
add a helper function.
...
llvm-svn: 93251
2010-01-12 19:40:54 +00:00
Devang Patel
f76941ed83
Use Twine, instead of StringRef, for consistency.
...
llvm-svn: 93249
2010-01-12 18:57:56 +00:00
Devang Patel
943ddf666d
Use ilist_tratis to autoinsert and remove NamedMDNode from MDSymbolTable.
...
llvm-svn: 93247
2010-01-12 18:34:06 +00:00
Evan Cheng
08557ef5f4
Eliminate or_not_add and just use AddedComplexity so isel tries or_is_add patterns first.
...
llvm-svn: 93245
2010-01-12 18:31:19 +00:00
Evan Cheng
0e9189371f
Add nounwind.
...
llvm-svn: 93244
2010-01-12 18:29:23 +00:00
Duncan Sands
b7168c270e
Revert commit 93204, since it causes the assembler to barf
...
on x86-64 linux with messages like this:
Error: Incorrect register `%r14' used with `l' suffix
llvm-svn: 93242
2010-01-12 17:46:16 +00:00
Duncan Sands
0067d6bbbe
Fix typo.
...
llvm-svn: 93235
2010-01-12 08:30:46 +00:00
Duncan Sands
fd75e12954
Tweak commit 91745, which changed target data for both Mingw and Cygwin,
...
to not touch Cygwin: the change caused llvm-gcc build failures due to
long double getting the wrong size. Patch by Aaron Gray.
llvm-svn: 93234
2010-01-12 08:21:07 +00:00
Dan Gohman
9059833de6
Make several tests less fragile.
...
llvm-svn: 93230
2010-01-12 04:52:47 +00:00
Dan Gohman
c119580307
Reapply the MOV64r0 patch, with a fix: MOV64r0 clobbers EFLAGS.
...
llvm-svn: 93229
2010-01-12 04:42:54 +00:00