1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

167 Commits

Author SHA1 Message Date
Nadav Rotem
f1aab5f6b7 Fix a bug in mayHaveSideEffects. Functions that do not return are now considered as instructions with side effects.
rdar://13227456

llvm-svn: 175553
2013-02-19 20:02:09 +00:00
Nadav Rotem
9eca7cc973 Fix a bug that was found by the clang static analyzer. The var "AT" is null so we cant deref it.
llvm-svn: 175550
2013-02-19 19:36:59 +00:00
Benjamin Kramer
3137f73f0e Futureproof AttrBuild if we ever have more than 64 attr enum values.
Currently we're at 34. Bitset should compile into virtually the same code as
uint64_t here.

llvm-svn: 175437
2013-02-18 12:09:51 +00:00
David Blaikie
136cd29e34 DIBuilder: Correct the null/0 type of trailing fields in struct debug info.
Paired with an Clang commit so this may cause temporary build failures.

llvm-svn: 175426
2013-02-18 07:27:30 +00:00
David Blaikie
5a469eb56d DIBuilder: Add function and method definitions to the list of all subprograms
Previously we seemed to be assuming that all functions were definitions and all
methods were declarations. This may be consistent with how Clang uses DIBuilder
but doesn't have to be true of all clients (such as DragonEgg).

llvm-svn: 175423
2013-02-18 07:10:22 +00:00
David Blaikie
4cbcad5731 Narrow the return types of a few DIBuilder utility functions.
llvm-svn: 175421
2013-02-18 06:41:57 +00:00
Duncan Sands
b50d4cfa0b Add multithreading functions and shutdown to the C API. Patch by Moritz
Maxeiner.

llvm-svn: 175398
2013-02-17 16:35:51 +00:00
Benjamin Kramer
920e1f81a3 GCC doesn't like ++ on enums.
llvm-svn: 175373
2013-02-16 19:22:28 +00:00
Benjamin Kramer
493e1a2895 Turn the enum attributes DenseSet in AttrBuilder into a set of bits.
Avoids malloc and is a lot denser. We lose iteration over target independent
attributes, but that's a strange interface anyways and didn't have any users
outside of AttrBuilder.

llvm-svn: 175370
2013-02-16 19:13:18 +00:00
Bill Wendling
12753ce9bc Simplify the 'operator<' for the attribute object.
llvm-svn: 175252
2013-02-15 05:25:26 +00:00
Anna Zaks
ebd25dd190 Revert "Simplify the attributes '<' comparison function."
This reverts commit 82c101153fe7b35bce48781fab038e1b8f31a7bd.

llvm-svn: 175250
2013-02-15 04:15:55 +00:00
Bill Wendling
67e51ec173 Simplify the attributes '<' comparison function.
llvm-svn: 175235
2013-02-15 00:55:08 +00:00
Bill Wendling
0b2ac39b29 s/bool/LLVMBool/
llvm-svn: 175204
2013-02-14 19:40:27 +00:00
Bill Wendling
cff8f3e5f2 Add two new functions to the C API:
LLVMCreateMemoryBufferWithMemoryRange - exposes MemoryBuffer::getMemBuffer
 LLVMCreateMemoryBufferWithMemoryRangeCopy - exposes MemoryBuffer::getMemBufferCopy

Patch by Moritz Maxeiner!

llvm-svn: 175199
2013-02-14 19:11:28 +00:00
Bill Wendling
8d3d898234 Use array_pod_sort.
llvm-svn: 175048
2013-02-13 09:26:26 +00:00
Bill Wendling
45be8c5d89 Add some accessor and query methods for retrieving Attribute objects and such.
llvm-svn: 175046
2013-02-13 08:42:21 +00:00
Guy Benyei
92dac48079 Add static cast to unsigned char whenever a character classification function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration.
llvm-svn: 175006
2013-02-12 21:21:59 +00:00
Bill Wendling
03550a5d33 Support string attributes in the AttrBuilder.
llvm-svn: 174948
2013-02-12 07:56:49 +00:00
David Blaikie
ec946c1606 DIBuilder: make the return type of createBasicType more specific
llvm-svn: 174924
2013-02-12 00:40:41 +00:00
Bill Wendling
f45666e4e9 Add support for printing out the attribute groups.
This emits the attribute groups that are used by the functions. (It currently
doesn't print out return type or parameter attributes within attribute groups.)

Note: The functions still retrieve their attributes from the "old" bitcode
format (using the deprecated 'Raw()' method). This means that string attributes
within an attribute group will not show up during a disassembly. This will be
addressed in a future commit.

llvm-svn: 174867
2013-02-11 08:43:33 +00:00
Kostya Serebryany
8e2f1fbfb7 [tsan/msan] adding thread_safety and uninitialized_checks attributes
llvm-svn: 174864
2013-02-11 08:13:54 +00:00
Bob Wilson
3fa3bbfe65 Revert "Rename LLVMContext diagnostic handler types and functions."
This reverts my commit 171047. Now that I've removed my misguided attempt to
support backend warnings, these diagnostics are only about inline assembly.
It would take quite a bit more work to generalize them properly, so I'm
just reverting this.

llvm-svn: 174860
2013-02-11 05:37:07 +00:00
David Blaikie
9ca06623be Fix unnecessary removal of const through cast machinery
I have some uncommitted changes to the cast code that catch this sort of thing
at compile-time but I still need to do some other cleanup before I can enable
it.

llvm-svn: 174853
2013-02-11 01:16:51 +00:00
Bill Wendling
9d49d49b2a The 'Raw' method cannot handle 'string' attributes. Don't even try.
llvm-svn: 174848
2013-02-10 23:18:05 +00:00
Bill Wendling
3eaebd7f41 Handle string attributes in the AttrBuilder.
llvm-svn: 174834
2013-02-10 10:13:23 +00:00
Bill Wendling
b1c6e7b69e Add 'empty' query methods to the builder and use them in the verifier.
llvm-svn: 174832
2013-02-10 10:12:06 +00:00
Bill Wendling
eb7e06de6d Add accessor for the LLVMContext.
llvm-svn: 174824
2013-02-10 05:00:40 +00:00
Sergei Larin
e7fdf91e88 Enable *BasicBlockPass::createPrinterPass()
Enables raw_ostream I/O for BasicBlockPass.

llvm-svn: 174776
2013-02-08 23:37:41 +00:00
Dan Gohman
9986030aee Minor cleanup.
llvm-svn: 174756
2013-02-08 22:01:47 +00:00
Bob Wilson
1540efb8f2 Revert "Add LLVMContext::emitWarning methods and use them. <rdar://problem/12867368>"
This reverts r171041. This was a nice idea that didn't work out well.
Clang warnings need to be associated with warning groups so that they can
be selectively disabled, promoted to errors, etc. This simplistic patch didn't
allow for that. Enhancing it to provide some way for the backend to specify
a front-end warning type seems like overkill for the few uses of this, at
least for now.

llvm-svn: 174748
2013-02-08 21:48:29 +00:00
Craig Topper
4ba9d33da9 Remove extra blank line between closing curly brace and 'else'
llvm-svn: 174492
2013-02-06 06:50:38 +00:00
Craig Topper
d4a8a10013 Remove unused private field to suppress a build warning.
llvm-svn: 174491
2013-02-06 06:48:10 +00:00
Bill Wendling
f45bd45085 Add a 'StringRef' version of hasAttribute.
Fix the 'operator==' and 'hasAttributes' queries to take into account
target-dependent attributes.

llvm-svn: 174481
2013-02-06 01:33:42 +00:00
Bill Wendling
555fe288d9 Add methods to merge an AttrBuilder into another builder.
This is useful when parsing an object that references multiple attribute groups.

N.B. If both builders have alignments specified, then they should match!

llvm-svn: 174480
2013-02-06 01:16:00 +00:00
Bill Wendling
dffa0dbdc3 Add the target-dependent (string) attributes from the AttrBuilder to the AttributeSet.
llvm-svn: 174467
2013-02-05 23:48:36 +00:00
Bill Wendling
baf40a92db Convert to storing the attribute's internals as enums, integers, and strings.
The stuff we're handing are all enums (Attribute::AttrKind), integers and
strings. Don't convert them to Constants, which is an unnecessary step here. The
rest of the changes are mostly mechanical.

llvm-svn: 174456
2013-02-05 22:37:24 +00:00
Bill Wendling
5bcf9a9307 Add target-dependent versions of addAttribute/removeAttribute to AttrBuilder.
llvm-svn: 174356
2013-02-05 08:09:32 +00:00
Michael Gottesman
15a605b34e Added LLVM Asm/Bitcode Reader/Writer support for new IR keyword externally_initialized.
llvm-svn: 174340
2013-02-05 05:57:38 +00:00
Bill Wendling
401162ecf9 Initial cleanups of the param-attribute code in the bitcode reader/writer.
Rename the PARAMATTR_CODE_ENTRY to PARAMATTR_CODE_ENTRY_OLD. It will be replaced
by another encoding. Keep around the current LLVM attribute encoder/decoder
code, but move it to the bitcode directories so that no one's tempted to use
them.

llvm-svn: 174335
2013-02-04 23:32:23 +00:00
David Blaikie
3f58472b83 [DebugInfo] remove more node indirection (this time from the subprogram's variable lists)
llvm-svn: 174305
2013-02-04 05:56:36 +00:00
David Blaikie
727f1e8774 PR15149: crash when printing debug info metadata containing an invalid language spec
llvm-svn: 174304
2013-02-04 05:31:37 +00:00
Michael Gottesman
e7a0dbefe5 Added instance variable/initializers/getter/setters for new keyword externally initialized to GlobalVariable. No *TRUE* functionality change.
I am going to add in the actual test cases with the actual functionality
changes in a later patch because I want to include some test cases.

To be clear when I say no *TRUE* functionality change I mean that this
patch (like it says in the title) only contains getters/setters and sets
up a default initial value of the instance variable to false so that
this patch does not affect any other uses of Global Variable.h.

llvm-svn: 174295
2013-02-03 21:54:38 +00:00
David Blaikie
7c3ec60da7 Remove the (apparently) unnecessary debug info metadata indirection.
The main lists of debug info metadata attached to the compile_unit had an extra
layer of metadata nodes they went through for no apparent reason. This patch
removes that (& still passes just as much of the GDB 7.5 test suite). If anyone
can show evidence as to why these extra metadata nodes are there I'm open to
reverting this patch & documenting why they're there.

llvm-svn: 174266
2013-02-02 05:56:24 +00:00
Bill Wendling
16d277acec Remove AttrBuilder::Raw().
llvm-svn: 174251
2013-02-02 00:52:44 +00:00
Bill Wendling
7a69360bb2 Use the AttributeSet's iterators.
Use the AttributeSet's iterators in AttrBuilder::hasAttributes() when
determining of the intersection of the AttrBuilder and AttributeSet is non-null.

llvm-svn: 174250
2013-02-02 00:42:06 +00:00
Bill Wendling
867f5df67b Change the AttributeImpl to hold a single Constant* for the values.
This Constant could be an aggregate to represent multiple values.

llvm-svn: 174228
2013-02-01 22:32:30 +00:00
Bill Wendling
5c32451ec5 Remove some dead code, improve some asserts, and other assorted changes. No functionality change.
llvm-svn: 174132
2013-02-01 01:04:27 +00:00
Bill Wendling
b272a4d3bf Remove one of the odious 'Raw' methods.
llvm-svn: 174130
2013-02-01 00:48:14 +00:00
Bill Wendling
f2edd83fe8 Use iterators instead of relying upon a bitmask of attributes to remove attributes from an AttrBuilder.
llvm-svn: 174123
2013-02-01 00:13:50 +00:00
Bill Wendling
a55db587cd Add iterators to the AttributeSet class so that we can access the Attributes in a nice way.
llvm-svn: 174120
2013-01-31 23:53:05 +00:00