Victor Hernandez
e5f811e0a6
Extend testcase to also test llvm.dbg.value intrinsic
...
llvm-svn: 93408
2010-01-14 02:12:41 +00:00
Victor Hernandez
70e33c3acd
Now that LLParser, AsmWriter, BitcodeReader, and BitcodeWriter all correctly support function-local metadata, test it.
...
llvm-svn: 93406
2010-01-14 01:51:28 +00:00
Victor Hernandez
6878a7e7b6
In WriteFunction(), write function-local metadata before we write the instructions, so instruction's references to metadata are fully resolved by the time they get written.
...
llvm-svn: 93403
2010-01-14 01:50:08 +00:00
Victor Hernandez
36a22e479a
Fix printing of function-local metadata in AsmWriter
...
llvm-svn: 93402
2010-01-14 01:47:37 +00:00
Victor Hernandez
367ef8bf4a
Clean up unnecessary return and brackets
...
llvm-svn: 93401
2010-01-14 01:46:02 +00:00
Victor Hernandez
cc00507183
Add MDNode::getFunction(), which figures out the metadata's function, if it has function that it is local to.
...
llvm-svn: 93400
2010-01-14 01:45:14 +00:00
Jakob Stoklund Olesen
5fdcc970a2
Don't fold insufficiently aligned ldr/str into ldm/stm instructions.
...
An unaligned ldr causes a trap, and is then emulated by the kernel with
awesome performance. The darwin kernel does not emulate unaligned ldm/stm
Thumb2 instructions, so don't generate them.
This fixes the miscompilation of Multisource/Applications/JM/lencod for Thumb2.
Generating unaligned ldr/str pairs from a 16-bit aligned memcpy is probably
also a bad idea, but that is beyond the scope of this patch.
llvm-svn: 93393
2010-01-14 00:54:10 +00:00
Stuart Hastings
a27112f01a
Erm, previous patch was wrong; Thanks Bill\!
...
llvm-svn: 93381
2010-01-14 00:34:53 +00:00
Stuart Hastings
47cfd4abc0
Enable assertions by default for Apple-style builds.
...
llvm-svn: 93380
2010-01-14 00:22:05 +00:00
Chris Lattner
72a06499b3
this is an SSE-specific issue.
...
llvm-svn: 93373
2010-01-13 23:29:11 +00:00
Chris Lattner
0aa093dbdf
X86 if conversion + tail merging issues from PR6032.
...
llvm-svn: 93372
2010-01-13 23:28:40 +00:00
Bill Wendling
488a7187b4
When the visitSub method was split into visitSub and visitFSub, this xform was
...
added to the FSub version. However, the original version of this xform guarded
against doing this for floating point (!Op0->getType()->isFPOrFPVector()).
This is causing LLVM to perform incorrect xforms for code like:
void func(double *rhi, double *rlo, double xh, double xl, double yh, double yl){
double mh, ml;
double c = 134217729.0;
double up, u1, u2, vp, v1, v2;
up = xh*c;
u1 = (xh - up) + up;
u2 = xh - u1;
vp = yh*c;
v1 = (yh - vp) + vp;
v2 = yh - v1;
mh = xh*yh;
ml = (((u1*v1 - mh) + (u1*v2)) + (u2*v1)) + (u2*v2);
ml += xh*yl + xl*yh;
*rhi = mh + ml;
*rlo = (mh - (*rhi)) + ml;
}
The last line was optimized away, but rl is intended to be the difference
between the infinitely precise result of mh + ml and after it has been rounded
to double precision.
llvm-svn: 93369
2010-01-13 23:23:17 +00:00
Tobias Grosser
fc9e55b439
Add getSource() to SuccIterator
...
Get the source BB of an iterator.
llvm-svn: 93364
2010-01-13 22:21:43 +00:00
Tobias Grosser
44e38a98c5
Extend SuccIterator
...
Implement most of the missing methods to make SuccIterator random access.
operator[] is still missing.
llvm-svn: 93363
2010-01-13 22:21:28 +00:00
Chris Lattner
b5605b72b7
this test requires SSE, thanks to jyasskin for pointing this out.
...
llvm-svn: 93360
2010-01-13 21:51:41 +00:00
Chris Lattner
e73ff5ecc3
makeNameProper is now private!
...
llvm-svn: 93357
2010-01-13 21:31:39 +00:00
Chris Lattner
4ce6464609
fix ELF section mangling stuff for weak symbols to not use
...
obsolete Mangler interfaces.
llvm-svn: 93356
2010-01-13 21:29:21 +00:00
Victor Hernandez
55e8dacfed
Fix comment typo
...
llvm-svn: 93355
2010-01-13 21:25:04 +00:00
Chris Lattner
c073f1009a
tidy
...
llvm-svn: 93352
2010-01-13 21:21:29 +00:00
Chris Lattner
4dcb71cc65
reduce duplicate mangling logic by using MCSymbol::printMangledName.
...
llvm-svn: 93351
2010-01-13 21:12:34 +00:00
Chris Lattner
9498bee8a3
expose a static function as a static method on the MCSymbol class.
...
llvm-svn: 93350
2010-01-13 21:09:59 +00:00
Johnny Chen
08c211683b
Fixed a couple of places for Thumb MOV where encoding bits are underspecified.
...
llvm-svn: 93349
2010-01-13 21:00:26 +00:00
Jakob Stoklund Olesen
27e36e52f5
Fix pasto
...
llvm-svn: 93342
2010-01-13 19:54:39 +00:00
Chris Lattner
6d1ddfeff2
stop the CBE from using deprecated Mangler stuff.
...
llvm-svn: 93341
2010-01-13 19:54:07 +00:00
Victor Hernandez
d250df09f5
Write function-local metadata as a metadata subblock of a funciton block
...
llvm-svn: 93339
2010-01-13 19:37:33 +00:00
Victor Hernandez
9938929f1f
Enumerate function-local metadata (and its types and operands) only during function-incorporation, global metadata continues to be enumerated during creation of ValueEnumerator
...
llvm-svn: 93338
2010-01-13 19:36:16 +00:00
Victor Hernandez
4e63ccc1c3
Parse function-local metadata inside function blocks
...
llvm-svn: 93337
2010-01-13 19:34:08 +00:00
Chris Lattner
b255aee77a
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
0fa1e2d063
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
10021a1e25
just finish MCizing FnStubInfo which cleans it up and simplifies it.
...
llvm-svn: 93334
2010-01-13 19:13:16 +00:00
Chris Lattner
5c38b08b40
don't call getNameWithPrefix repeatedly and unnecesarily.
...
llvm-svn: 93333
2010-01-13 19:05:36 +00:00
Chris Lattner
6b0af1d420
properly use MCSymbol to print the strings aquired from getNameWithPrefix.
...
llvm-svn: 93332
2010-01-13 19:00:57 +00:00
Benjamin Kramer
5db856d384
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
2afc417122
Re-enable extension optimization pass.
...
llvm-svn: 93313
2010-01-13 08:45:40 +00:00
Chris Lattner
d63a5fea41
upgrade and MC'ize a few uses of makeNameProper.
...
llvm-svn: 93310
2010-01-13 08:08:33 +00:00
Chris Lattner
34047fe59f
MC'ize this a bit and upgrade APIs
...
llvm-svn: 93309
2010-01-13 08:04:24 +00:00
Chris Lattner
29a0ff2e70
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
98af245e5f
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
f6f274ef64
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
f2090cf7fd
eliminate some uses of Mangler::makeNameProper.
...
llvm-svn: 93305
2010-01-13 07:56:59 +00:00
Chris Lattner
ba8b3ed4f1
don't add the \1 to the name.
...
llvm-svn: 93304
2010-01-13 07:50:21 +00:00
Chris Lattner
1b6c061cd0
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
086d0d1a2b
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
9c1ca33ac3
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
951cfb6b8b
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
3c2fad1fc6
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
23127baf26
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
b8f828a848
change makeNameProper to take a stringref instead of std::string.
...
llvm-svn: 93295
2010-01-13 04:55:33 +00:00
Chris Lattner
a8deef7d39
give StringRef a const_iterator member.
...
llvm-svn: 93294
2010-01-13 04:50:20 +00:00
Chris Lattner
e8e56916d1
fix assert in AsmPrinter::EmitGlobalConstantLargeInt to match reality.
...
llvm-svn: 93293
2010-01-13 04:39:46 +00:00