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

342 Commits

Author SHA1 Message Date
Eric Christopher
b14abb7320 Remove unnecessary constructors as the default conversions will handle
all enumerated cases. Reformat the rest of the existing constructors to
match.

llvm-svn: 187015
2013-07-24 01:21:02 +00:00
Eric Christopher
a03219a561 More constructor cleanup.
Move to a single constructor with a default argument and avoid
the check and nullification.

llvm-svn: 187014
2013-07-24 01:06:21 +00:00
Eric Christopher
15e66ae534 Collapse logic and move and reword comment for clarity.
llvm-svn: 187013
2013-07-24 00:54:39 +00:00
Eric Christopher
57ac2aa13c Add a fixme and reformat.
llvm-svn: 187012
2013-07-24 00:54:36 +00:00
Manman Ren
35c74ac066 Debug Info: improve the Finder.
Improve the Finder to handle context of a DIVariable.
If Scope is a DICompileUnit, add it to the list of CUs.

llvm-svn: 187003
2013-07-23 23:10:00 +00:00
Manman Ren
126ad9da7f Debug Info: clean up.
llvm-svn: 187002
2013-07-23 23:07:38 +00:00
Eric Christopher
5bf7f18240 Remove unused function.
llvm-svn: 187001
2013-07-23 22:50:42 +00:00
Manman Ren
0ec3e4b5d0 Debug Info: code cleanup, use getNodeField if possible.
Use getNodeField to access a field as a MDNode.
No functionality change.

llvm-svn: 186985
2013-07-23 20:39:32 +00:00
Manman Ren
0cc91bd60a DebugInfo Verifier: verify the actual type.
llvm-svn: 186972
2013-07-23 18:14:25 +00:00
Manman Ren
3a6f508b6b Debug Info Finder: use processDeclare and processValue to list debug info
MDNodes used by DbgDeclareInst and DbgValueInst.

Another 16 testing cases failed and they are disabled with
-disable-debug-info-verifier.
A total of 34 cases are disabled with -disable-debug-info-verifier and will be
corrected.

llvm-svn: 186902
2013-07-23 00:22:51 +00:00
Manman Ren
24b63d9007 Debug Info Finder: add processScope to actually handle the Scope.
Instead of just adding the scope to the list, we actually handle the scope.

llvm-svn: 186867
2013-07-22 20:28:53 +00:00
Matt Arsenault
ff6bd087c7 Disallow global aliases to bitcast between address spaces
llvm-svn: 186767
2013-07-20 17:46:05 +00:00
Matt Arsenault
3232505141 Remove trailing whitespace, fix file path in comment
llvm-svn: 186766
2013-07-20 17:46:00 +00:00
Manman Ren
e130e02443 Debug Info Verifier: simplify DIxxx::Verify
Simplify DIxxx:Verify to not call Verify on an operand. Instead, we use
DebugInfoFinder to list all MDNodes that should be a DIScope and all MDNodes
that should be a DIType and we will call Verify on those lists.

llvm-svn: 186737
2013-07-20 00:38:46 +00:00
Rafael Espindola
6178a47aa5 s/compiler_used/compiler.used/.
We were incorrectly using compiler_used instead of compiler.used. Unfortunately
the passes using the broken name had tests also using the broken name.

llvm-svn: 186705
2013-07-19 18:44:51 +00:00
Eric Christopher
172dc14902 Remove DIBuilder cache of variable TheCU and change the few
uses that wanted it. Also change the interface for createCompileUnit
to compensate. Fix comments that refer to TheCU as well.

llvm-svn: 186637
2013-07-19 00:51:47 +00:00
Manman Ren
d66f7fe8a2 Debug Info: enable verifying by default and disable testing cases that fail.
1> Use DebugInfoFinder to find debug info MDNodes.
2> Add disable-debug-info-verifier to disable verifying debug info.
3> Disable verifying for testing cases that fail (will update the testing cases
   later on).
4> MDNodes generated by clang can have empty filename for TAG_inheritance and
   TAG_friend, so DIType::Verify is modified accordingly.

Note that DebugInfoFinder does not list all debug info MDNode.
For example, clang can generate:
metadata !{i32 786468}, which will fail to verify.
This MDNode is used by debug info but not included in DebugInfoFinder.
This MDNode is generated as a temporary node in DIBuilder::createFunction
  Value *TElts[] = { GetTagConstant(VMContext, DW_TAG_base_type) };
  MDNode::getTemporary(VMContext, TElts)

llvm-svn: 186634
2013-07-19 00:31:03 +00:00
Eric Christopher
1a3914a23a Revert "Remove DIBuilder cache of variable TheCU and change the few"
This reverts commit r186599 as I didn't want to commit this yet.

llvm-svn: 186601
2013-07-18 19:13:06 +00:00
Eric Christopher
9b80723f96 Remove DIBuilder cache of variable TheCU and change the few
uses that wanted it. Also change the interface for createCompileUnit
to compensate. Fix comments that refer to TheCU as well.

llvm-svn: 186599
2013-07-18 19:11:29 +00:00
Manman Ren
929ebf85f2 Add getModuleFlag(StringRef Key) to query a module flag given Key.
No functionality change.

llvm-svn: 186470
2013-07-16 23:21:16 +00:00
Craig Topper
58fa7a9b4a Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.
llvm-svn: 186274
2013-07-14 04:42:23 +00:00
Charles Davis
2b2075f834 Target/X86: Add explicit Win64 and System V/x86-64 calling conventions.
Summary:
This patch adds explicit calling convention types for the Win64 and
System V/x86-64 ABIs. This allows code to override the default, and use
the Win64 convention on a target that wants to use SysV (and
vice-versa). This is needed to implement the `ms_abi` and `sysv_abi` GNU
attributes.

Reviewers:

CC:

llvm-svn: 186144
2013-07-12 06:02:35 +00:00
Benjamin Kramer
e161438f33 Reduce the number of indirections in the attributes implementation.
- Coallocate entires for AttributeSetImpls and Nodes after the class itself.
- Remove mutable iterators from immutable classes.
- Remove unused context field from AttributeImpl.
- Derive Enum/Align/String attribute implementations from AttributeImpl instead
  of having a whole new inheritance tree for them.
- Derive AlignAttributeImpl from EnumAttributeImpl.

llvm-svn: 186075
2013-07-11 12:13:16 +00:00
Hal Finkel
6d75832312 Don't assert if we can't constant fold extract/insertvalue
A non-constant-foldable static initializer expression containing insertvalue or
extractvalue had been causing an assert:

  Constants.cpp:1971: Assertion `FC && "ExtractValue constant expr couldn't be
                                 folded!"' failed.

Now we report a more-sensible "Unsupported expression in static initializer"
error instead.

Fixes PR15417.

llvm-svn: 186044
2013-07-10 22:51:01 +00:00
Eric Christopher
e42a65a9b8 Revert "DebugInfo: remove unused helper function getDICompositeType."
This reverts commit r185876 as the functions appear to still be used
by dragonegg.

llvm-svn: 185890
2013-07-09 00:16:56 +00:00
Manman Ren
9e436c6bea DebugInfo: remove unused helper function getDICompositeType.
llvm-svn: 185876
2013-07-08 21:55:46 +00:00
Nick Lewycky
7b093a1c2f Extend 'readonly' and 'readnone' to work on function arguments as well as
functions. Make the function attributes pass add it to known library functions
and when it can deduce it.

llvm-svn: 185735
2013-07-06 00:29:58 +00:00
David Blaikie
f924589b7d DebugInfo: Consider global variables without locations to be valid
We were being a bit too aggresive here in classifying global variables
with no global reference or constant value to be invalid - this would
cause LLVM to not emit the DWARF description of the global variable if
it had been optimized away, which isn't helpful for users who might
benefit from the global variable's description even if there's no
location information.

This also fixes a crasher issue here that I was unable to reduce a test
case for - involving a using decl (& subsequent
DW_TAG_imported_declaration ) of such a global variable that, once
optimized away, would crash when an attempt to emit the imported
declaration was made.

llvm-svn: 185675
2013-07-04 23:15:18 +00:00
Craig Topper
783617eba7 Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.
llvm-svn: 185606
2013-07-04 01:31:24 +00:00
Chad Rosier
13dd68f55a Use an RWMutex instead of a Mutex in PassRegistry.
Patch by Alex Crichton <alex@crichton.co>.  Approved by Chris Lattner.

llvm-svn: 185566
2013-07-03 18:38:08 +00:00
Craig Topper
9729e843cb Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid specifying the vector size.
llvm-svn: 185540
2013-07-03 15:07:05 +00:00
Manman Ren
ba4fbdaf28 Debug Info: cleanup
llvm-svn: 185456
2013-07-02 18:37:35 +00:00
Tobias Grosser
0c31515335 IRVerifier: Correctly check attribute types
Add missing parenthesis such that all and not only the very first attribute
is checked.

Testing this piece of code is not possible with an LLVM-IR test file, as the
LLVM-IR parser has a similar check such that the wrong IR does not even arrive
at the verifier.

llvm-svn: 185408
2013-07-02 03:28:10 +00:00
Manman Ren
8b22b0ee27 Debug Info: clean up usage of Verify.
No functionality change. It should suffice to check the type of a debug info
metadata, instead of calling Verify.

llvm-svn: 185383
2013-07-01 21:02:01 +00:00
Manman Ren
3985839b7f Debug Info: Scope of a DebugLoc should not be null.
No functionality change. Remove handling for the null case.

llvm-svn: 185354
2013-07-01 18:20:30 +00:00
Benjamin Kramer
dc3c6d36e0 ConstantFold: Check that truncating the other side is safe under a sext when trying to remove a sext from a compare.
Fixes PR16462.

llvm-svn: 185284
2013-06-30 13:47:43 +00:00
Manman Ren
f64f19796c Debug Info: clean up usage of Verify.
No functionality change.
It should suffice to check the type of a debug info metadata, instead of
calling Verify. For cases where we know the type of a DI metadata, use
assert.

llvm-svn: 185249
2013-06-29 05:01:19 +00:00
Matt Arsenault
bccd895589 Fix extra whitespace / formatting
llvm-svn: 185238
2013-06-28 23:24:05 +00:00
Peter Collingbourne
205194c023 Rename DIBuilder::createNullPtrType to createUnspecifiedType and introduce
a zero-argument createNullPtrType function for creating the canonical
nullptr type.

Differential Revision: http://llvm-reviews.chandlerc.com/D1050

llvm-svn: 185114
2013-06-27 22:50:59 +00:00
Michael Gottesman
fe055b3806 Added support for the Builtin attribute.
The Builtin attribute is an attribute that can be placed on function call site that signal that even though a function is declared as being a builtin,

rdar://problem/13727199

llvm-svn: 185049
2013-06-27 00:25:01 +00:00
Adrian Prantl
cf96a5d3de s/C++0x/C++11/
llvm-svn: 184892
2013-06-25 23:42:37 +00:00
Bill Wendling
7d3ed86eaa The GCDA 402 format won't have a second checksum either.
llvm-svn: 184864
2013-06-25 18:13:52 +00:00
Adrian Prantl
3768276ade typo.
llvm-svn: 184783
2013-06-24 21:19:43 +00:00
David Blaikie
2bf3b1e948 DebugInfo: DIBuilder changes to match DIEnumerator changes in r184694
Representing enumerators by int64 instead of uint64 for now. At some
point we need to address the underlying issue of representation
depending on the specific enumeration.

llvm-svn: 184761
2013-06-24 17:34:33 +00:00
David Blaikie
88d5262317 DebugInfo: Support (using GNU extensions) for template template parameters and parameter packs
llvm-svn: 184643
2013-06-22 18:59:11 +00:00
David Blaikie
1761f49491 DebugInfo: When asm printing include a '[def]' tag for tag decls that are definitions (& rename the 'fwd' tag to 'decl' for clarity)
This change is version locked with a change in Clang, so expect some
transient buildbot fallout.

llvm-svn: 184525
2013-06-21 03:41:54 +00:00
Michael Gottesman
649738ce71 [APFloat] Converted all references to APFloat::isNormal => APFloat::isFiniteNonZero.
Turns out all the references were in llvm and not in clang.

llvm-svn: 184356
2013-06-19 21:23:18 +00:00
Bill Wendling
025f285316 We want a string representation of the attribute, not the kind as a string.
llvm-svn: 184239
2013-06-18 21:27:00 +00:00
Derek Schuff
a5f20f3678 Fix DeleteDeadVarargs not to crash on functions referenced by BlockAddresses
This pass was assuming that if hasAddressTaken() returns false for a
function, the function's only uses are call sites.  That's not true
because there can be references by BlockAddresses too.

Fix the pass to handle this case.  Fix
BlockAddress::replaceUsesOfWithOnConstant() to allow a function's type
to be changed by RAUW'ing the function with a bitcast of the recreated
function.

Patch by Mark Seaborn.

llvm-svn: 183933
2013-06-13 19:51:17 +00:00
Rafael Espindola
22c806731c Require members of llvm.used to be named.
The effect of llvm.used is to introduce an invisible reference, so this seems
a reasonable restriction. It will be used to provide an easy ordering of
the entries in llvm.used.

llvm-svn: 183743
2013-06-11 13:18:13 +00:00