1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 12:33:33 +02:00
Commit Graph

3280 Commits

Author SHA1 Message Date
Victor Hernandez
c1b5223e76 Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.
It also strips old llvm.dbg.declare intrinsics that did not pass metadata as the first argument.

llvm-svn: 93531
2010-01-15 19:04:09 +00:00
Victor Hernandez
97d7107d5e Revert r93504 because older uses of llvm.dbg.declare intrinsics need to be auto-upgraded
llvm-svn: 93515
2010-01-15 17:36:47 +00:00
Victor Hernandez
aee71b4e81 Improve llvm.dbg.declare intrinsic by referring directly to the storage in its first argument, via function-local metadata (instead of via a bitcast).
This patch also cleans up code that expects there to be a bitcast in the first argument and testcases that call llvm.dbg.declare.

llvm-svn: 93504
2010-01-15 03:37:48 +00:00
Victor Hernandez
ff4f0aa119 In debug builds, assert that function-local metadata has only 1 parent function
llvm-svn: 93449
2010-01-14 20:12:34 +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
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
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
Chris Lattner
ba8b3ed4f1 don't add the \1 to the name.
llvm-svn: 93304
2010-01-13 07:50:21 +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
Dale Johannesen
1738d7d11a 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
Devang Patel
1d9c156df2 Use Twine, instead of StringRef, for consistency.
llvm-svn: 93249
2010-01-12 18:57:56 +00:00
Devang Patel
2a6c413df3 Use ilist_tratis to autoinsert and remove NamedMDNode from MDSymbolTable.
llvm-svn: 93247
2010-01-12 18:34:06 +00:00
Benjamin Kramer
cdbc36f961 Reimplement getToken and SplitString as "StringRef helper functions"
- getToken is modeled after StringRef::split but it can split on multiple
  separator chars and skips leading seperators.
- SplitString is a StringRef::split variant for more than 2 elements with the
  same behaviour as getToken.

llvm-svn: 93161
2010-01-11 18:03:24 +00:00
Victor Hernandez
832bd4fd2d Respond to Chris' review:
Make InsertDbgValueIntrinsic() and get Offset take and recieve a uint64_t.
Get constness correct for getVariable() and getValue().

llvm-svn: 93149
2010-01-11 07:45:19 +00:00
Chris Lattner
56e327711b fix a buggy assertion, CreateIntegerCast should allow
integer vectors as well as just integers.

llvm-svn: 93126
2010-01-10 20:21:42 +00:00
Mikhail Glushenkov
e141fc9e1c Suppress a warning on gcc 4.4.
warning: suggest parentheses around ‘&&’ within ‘||’.
llvm-svn: 93121
2010-01-10 18:48:49 +00:00
Victor Hernandez
f4272b50d6 Compute isFunctionLocal in MDNode ctor or via argument in new function getWhenValsUnresolved().
Document PFS argument to ParseValID() and ConvertGlobalOrMetadataValIDToValue().

llvm-svn: 93108
2010-01-10 07:14:18 +00:00
Chris Lattner
953394de82 "In order to ease automatic bindings generation, it would be helpful if boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for."
Patch by James Y Knight!

llvm-svn: 93079
2010-01-09 22:27:07 +00:00
Devang Patel
bd58ff3f60 Delete NamedMDSymTable while destrucing Module.
Disable  copy ctor and operator= for NamedMDSymTable. Hide typedef that should be public.

llvm-svn: 93041
2010-01-09 01:44:59 +00:00
Devang Patel
ea208bf99c Derive NamedMDNode from Value.
llvm-svn: 93032
2010-01-09 00:30:14 +00:00
Devang Patel
10ee76f7f4 Use separate namespace for named metadata.
llvm-svn: 92931
2010-01-07 19:39:36 +00:00
Devang Patel
311b5584e5 Allow null to be an element of NamedMDNode. e.g. !llvm.stuff = !{!0, !1, null}
llvm-svn: 92783
2010-01-05 21:47:32 +00:00
Victor Hernandez
173518e4ae Fix comment for CheckDebugInfoIntrinsics
llvm-svn: 92774
2010-01-05 21:13:46 +00:00
Benjamin Kramer
0ba7479f2c Move remaining stuff to the isInteger predicate.
llvm-svn: 92771
2010-01-05 21:05:54 +00:00
Devang Patel
ab66612f1b NamedMDNode is a collection MDNodes.
llvm-svn: 92761
2010-01-05 20:41:31 +00:00
Benjamin Kramer
c233521d45 Convert a ton of simple integer type equality tests to the new predicate.
llvm-svn: 92760
2010-01-05 20:07:06 +00:00
Benjamin Kramer
6a11532b00 Add a new predicate for integer type equality tests.
llvm-svn: 92759
2010-01-05 20:04:48 +00:00
Benjamin Kramer
e90a3c66c4 Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
llvm-svn: 92726
2010-01-05 13:12:22 +00:00
David Greene
a2eb2bde9e Fix a build error and change errs() to dbgs().
llvm-svn: 92669
2010-01-05 01:34:26 +00:00
David Greene
2f3bd270a0 Change errs() to dbgs().
llvm-svn: 92665
2010-01-05 01:30:18 +00:00
David Greene
1ee15299b7 Change errs() to dbgs().
llvm-svn: 92664
2010-01-05 01:30:14 +00:00
David Greene
da24eb426d Change errs() to dbgs().
llvm-svn: 92663
2010-01-05 01:30:09 +00:00
David Greene
38e8cf6313 Change errs() to dbgs().
llvm-svn: 92662
2010-01-05 01:30:06 +00:00
David Greene
b4caa095f9 Change errs() to dbgs().
llvm-svn: 92661
2010-01-05 01:30:04 +00:00
David Greene
3a9e6e8827 Change errs() to dbgs().
llvm-svn: 92660
2010-01-05 01:30:02 +00:00
David Greene
36abd30d2e Change errs() to dbgs().
llvm-svn: 92659
2010-01-05 01:30:00 +00:00
David Greene
f8d868e805 Change errs() to dbgs().
llvm-svn: 92658
2010-01-05 01:29:58 +00:00
David Greene
446bde822e Change errs() to dbgs().
llvm-svn: 92657
2010-01-05 01:29:55 +00:00
David Greene
6ad48aba1c Change errs() to dbgs().
llvm-svn: 92656
2010-01-05 01:29:39 +00:00
David Greene
5008e561e3 Change errs() to dbgs().
llvm-svn: 92652
2010-01-05 01:29:26 +00:00
David Greene
8637fd7d59 Change errs() to dbgs().
llvm-svn: 92650
2010-01-05 01:29:19 +00:00
David Greene
053abe1bdb Change errs() to dbgs().
llvm-svn: 92649
2010-01-05 01:29:14 +00:00
Devang Patel
3b08c33f33 Remove dead debug info intrinsics.
Intrinsic::dbg_stoppoint
 Intrinsic::dbg_region_start 
 Intrinsic::dbg_region_end 
 Intrinsic::dbg_func_start
AutoUpgrade simply ignores these intrinsics now.

llvm-svn: 92557
2010-01-05 01:10:40 +00:00
Dan Gohman
4a8e4ee52a Add a comment.
llvm-svn: 92492
2010-01-04 18:38:39 +00:00
Chris Lattner
80802043f4 it isn't safe to speculative load from a malloc, it might have
returned null, and may not have been big enough in any case.  
Thanks to Jay Foad for pointing this out!

llvm-svn: 92452
2010-01-03 18:14:24 +00:00
Chris Lattner
7246a69d2b differences between two blockaddress's don't cause a
global variable initializer to require relocations.

llvm-svn: 92450
2010-01-03 18:09:40 +00:00