Commit Graph

17203 Commits

Author SHA1 Message Date
Dmitri Gribenko
328027bf26 Move UTF conversion routines from clang/lib/Basic to llvm/lib/Support
This is required to use them in TableGen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173923 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 12:05:05 +00:00
Jack Carter
97130e2b3d This patch implements runtime ARM specific
setting of ELF header e_flags.

Contributer: Jack Carter
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173885 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 02:24:33 +00:00
Jack Carter
9a7bf438b5 This patch reworks how llvm targets set
and update ELF header e_flags.

Currently gathering information such as symbol, 
section and data is done by collecting it in an 
MCAssembler object. From MCAssembler and MCAsmLayout 
objects ELFObjectWriter::WriteObject() forms and 
streams out the ELF object file.

This patch just adds a few members to the MCAssember 
class to store and access the e_flag settings. It 
allows for runtime additions to the e_flag by 
assembler directives. The standalone assembler can 
get to MCAssembler from getParser().getStreamer().getAssembler().

This patch is the generic infrastructure and will be
followed by patches for ARM and Mips for their target 
specific use.

Contributer: Jack Carter
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173882 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 02:09:52 +00:00
NAKAMURA Takumi
d749382c8c [autoconf]: Fix description in HAVE_CRASHREPORTER_INFO.
http://llvm-reviews.chandlerc.com/D332

Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173879 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-30 01:38:03 +00:00
Bill Wendling
6dc3781d44 Add a couple of accessor methods to get the kind and values of an attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173828 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-29 20:45:34 +00:00
Bill Wendling
606c8e36df Convert getAttributes() to return an AttributeSetNode.
The AttributeSetNode contains all of the attributes. This removes one (hopefully
last) use of the Attribute class as a container of multiple attributes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173761 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-29 03:20:31 +00:00
Evan Cheng
8688a58c53 Teach SDISel to combine fsin / fcos into a fsincos node if the following
conditions are met:
1. They share the same operand and are in the same BB.
2. Both outputs are used.
3. The target has a native instruction that maps to ISD::FSINCOS node or
   the target provides a sincos library call.

Implemented the generic optimization in sdisel and enabled it for
Mac OSX. Also added an additional optimization for x86_64 Mac OSX by
using an alternative entry point __sincos_stret which returns the two
results in xmm0 / xmm1.

rdar://13087969
PR13204


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173755 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-29 02:32:37 +00:00
Bill Wendling
8232ece5c1 Use an AttrBuilder to generate the correct AttributeSet.
We no longer accept an encoded integer as representing all of the
attributes. Convert this via the AttrBuilder class into an AttributeSet with the
correct representation (an AttributeSetImpl that holds a list of Attribute
objects).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173750 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-29 01:43:29 +00:00
Bill Wendling
817abdd8b0 S'more small non-functional changes in comments and #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173738 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-29 00:48:16 +00:00
Bill Wendling
c22f4aa886 Reorder some functions and add comments. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173733 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-29 00:34:06 +00:00
Bill Wendling
6bdbf061c3 Try to appease some broken compilers by using 'unsigned' instead of 'uint64_t'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173725 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-28 22:33:39 +00:00
Bill Wendling
87e10dfefa Remove the AttributeWithIndex class.
The AttributeWithIndex class exposed the interior structure of the AttributeSet
class. That was gross. Remove it and all of the code that relied upon it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173722 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-28 21:55:20 +00:00
Dan Gohman
c4e441804e Add a comment mentioning that InstructionSimplify routines do,
in fact, resolve undef uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173721 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-28 21:45:32 +00:00
Bill Wendling
19d815c04f Mid-air collision. reapply r173656.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173661 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-28 05:51:40 +00:00
Bill Wendling
98b92f3bf5 Rewrite the removeAttr() method.
This now uses the AttributeSet object instead of the Attribute /
AttributeWithIndex objects. It's fairly simple now. It goes through all of the
subsets before the one we're modifying, adds them to the new set. It then adds
the modified subset (with the requested attributes removed). And then adds the
rest of the subsets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173660 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-28 05:44:14 +00:00
Bill Wendling
49f6060f16 Rewrite the addAttr() method.
This now uses the AttributeSet object instead of the Attribute /
AttributeWithIndex objects. It's fairly simple now. It goes through all of the
subsets before the one we're modifying, adds them to the new set. It then adds
the modified subset. And then adds the rest of the subsets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173659 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-28 05:23:28 +00:00
NAKAMURA Takumi
53ff78b201 Revert r173646, "Use proper type for the index."
Unfortunately, msvc miscompiles it. Investigating.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173656 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-28 04:29:01 +00:00
Michael Gottesman
24c4898973 Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation for refactoring the ARC Optimizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173647 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-28 01:35:51 +00:00
Bill Wendling
a9b9f0ad80 Use proper type for the index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173646 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-28 01:30:29 +00:00
Bill Wendling
3e3e789aed Use proper return type for attribute index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173639 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-27 23:50:44 +00:00
Bill Wendling
d05204aea4 Push the calculation of the 'Raw' attribute mask down into the implementation. It in turn uses the correct list for calculating the 'Raw' value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173637 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-27 23:41:29 +00:00
Bill Wendling
2d5be6c313 Don't erase these methods. They're used during testing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173636 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-27 22:46:17 +00:00
Bill Wendling
c08a5ef658 Add special 'get' methods to create an Attribute with an alignment. Also do some random cleanup. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173635 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-27 22:43:04 +00:00
Bill Wendling
ec2589863b s/AttrList/pImpl/g in AttributeSet. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173628 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-27 21:23:46 +00:00
Bill Wendling
16f95669ec Fix miscompile. Add back the use of the ArrayRef version of the ::get method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173613 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-27 10:28:39 +00:00
Bill Wendling
08c11d3023 Rearrange some deckchairs. Moving the class before it's use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173612 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-27 10:00:13 +00:00
Bill Wendling
09dda440ba Remove dead methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173611 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-27 09:55:44 +00:00
Bill Wendling
7d38c109aa Hide the method that creates an AttributeSet with AttributeWithIndexes.
This method will go away once AttributeWithIndex goes away. In the meantime,
hide it from general use.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173607 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-27 03:35:32 +00:00
David Blaikie
ff715b2403 PR14566: Debug Info: Removing top level lexical blocks
This adds support for LLVM to accept metadata that doesn't include a top level
lexical block in a function. Specifically LLVM couldn't handle this when there
were file changes relating to these blocks. I've updated a few test cases to
ensure other functionality (such as inlining) isn't affected by this change, but
haven't pervasively updated all the test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173592 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-26 21:55:23 +00:00
David Blaikie
da6de52435 IRBuilder: Remove redundant check around SetInstDebugLocation call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173591 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-26 21:55:19 +00:00
NAKAMURA Takumi
3802947dec Object/RelocVisitor: Add minimal support, R_MIPS_32, for mips.
It fixes llvm-dwarfdump for mips and mipsel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173567 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-26 08:27:36 +00:00
NAKAMURA Takumi
994754feea Object/RelocVisitor: Add minimal support, R_PPC64_ADDR32, for ppc64.
It fixes llvm-dwarfdump for ppc64-elf.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173566 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-26 08:27:29 +00:00
NAKAMURA Takumi
1ae9e8b278 RelocVisitor::visit(): Set hasError in the default path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173565 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-26 08:27:23 +00:00
Andrew Kaylor
e27a787760 Add DIContext::getLineInfoForAddressRange() function and test. This function allows a caller to obtain a table of line information for a function using the function's address and size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173537 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-26 00:28:05 +00:00
Bill Wendling
32a5795822 Convert BuildLibCalls.cpp to using the AttributeSet methods instead of AttributeWithIndex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173536 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-26 00:03:11 +00:00
Bill Wendling
483bbd36b8 Remove dead method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173524 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 23:14:36 +00:00
Bill Wendling
8e47daf285 Remove some introspection functions.
The 'getSlot' function and its ilk allow introspection into the AttributeSet
class. However, that class should be opaque. Allow access through accessor
methods instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173522 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 23:09:36 +00:00
Andrew Kaylor
ee7c0d2f93 Add support for applying in-memory relocations to the .debug_line section and, in the case of ELF files, using symbol addresses when available for relocations to the .debug_info section. Also extending the llvm-rtdyld tool to add the ability to dump line number information for testing purposes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173517 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 22:50:58 +00:00
Reid Kleckner
66f1f30725 Add parens to suppress an MSVC 2012 << precedence warning
It doesn't seem to like instantiating the isUInt<unsigned N> template
with 6+3, and then doing <<N.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173507 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 22:12:45 +00:00
Nick Lewycky
6bbf4ff9c5 Add an insert() method to MapVector. Adds the first MapVector unit test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173505 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 22:11:02 +00:00
Bill Wendling
e1f95db480 Add an accessor method to get the slot's index. This will limit the use of AttributeWithIndex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173495 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 21:30:53 +00:00
David Blaikie
a506b00d14 This is no trule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173487 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 20:47:58 +00:00
Eli Bendersky
939a4e8b69 Add command-line flags for DWARF dumping.
Flags for dumping specific DWARF sections added in lib/DebugInfo and
llvm-dwarfdump.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173480 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 20:26:43 +00:00
Hal Finkel
d23a41c153 Add an addition operator to TableGen
This adds an !add(a, b) operator to tablegen; this will be used
to cleanup the PPC register definitions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173445 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 14:49:08 +00:00
Andrew Trick
3084979ff2 MachineScheduler support for viewGraph.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173432 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 07:45:29 +00:00
Andrew Trick
c6ada8e5f3 ScheduleDAG: colorize the DOT graph and improve formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173431 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 07:45:25 +00:00
Andrew Trick
a5a73ad159 ScheduleDAG: Added isBoundaryNode to conveniently detect a common corner case.
This fixes DAG subtree analysis at the boundary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173427 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 06:52:30 +00:00
Andrew Trick
988d06b0e5 SchedDFS: Complete support for nested subtrees.
Maintain separate per-node and per-tree book-keeping.
Track all instructions above a DAG node including nested subtrees.
Seperately track instructions within a subtree.
Record subtree parents.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173426 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 06:52:27 +00:00
Andrew Trick
4e1fb18940 MIsched: Improve the interface to SchedDFS analysis (subtrees).
Allow the strategy to select SchedDFS. Allow the results of SchedDFS
to affect initialization of the scheduler state.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173425 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 06:33:57 +00:00
Andrew Trick
827de0520e ArrayRef reverse iterators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173424 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25 06:33:52 +00:00