Commit Graph

18285 Commits

Author SHA1 Message Date
Sean Silva
6525e92b32 [yaml2obj][ELF] Allow symbols to reference sections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184468 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-20 20:59:41 +00:00
Rafael Espindola
11ca2e508c Add a setLastModificationAndAccessTime to PathV2.
With this we can remove the last use of PathV1 from llvm-ar.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184464 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-20 20:56:14 +00:00
Meador Inge
be87bce32b Remove the simplify-libcalls pass (finally)
This commit completely removes what is left of the simplify-libcalls
pass.  All of the functionality has now been migrated to the instcombine
and functionattrs passes.  The following C API functions are now NOPs:

  1. LLVMAddSimplifyLibCallsPass
  2. LLVMPassManagerBuilderSetDisableSimplifyLibCalls

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184459 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-20 19:48:07 +00:00
Rafael Espindola
29c17db650 Add support for getting the last modification time from a file_status.
Use that in llvm-ar.cpp to replace a use of sys::PathWithStatus.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184450 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-20 18:42:04 +00:00
Michael Gottesman
a1694e5784 [APFloat] Rename isIEEENormal => isNormal and remove old isNormal method.
The old isNormal is already functionally replaced by the method isFiniteNonZero
in r184350 and all references to said method were replaced in LLVM/clang in
r184356/134366.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184449 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-20 18:34:38 +00:00
Rafael Espindola
438600e697 Remove the transitional GetUniqueID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184433 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-20 15:20:11 +00:00
Rafael Espindola
9aa3365426 Rename fs::GetUniqueID to fs::getUniqueID to match the style guide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184431 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-20 15:06:35 +00:00
Bill Wendling
face8d901e Remove static, because it was messing everything up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184400 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-20 06:51:06 +00:00
Bill Wendling
3b6e067f56 Make the '==' operator inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184375 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 22:16:11 +00:00
Bill Wendling
8623ecb263 Make this static inline to avoid duplicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184374 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 22:12:11 +00:00
Bill Wendling
59aa540738 Make the comparison operators non-member functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184373 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 22:09:25 +00:00
David Blaikie
0159ae4295 DebugInfo: PR14763/r183329 correct the location of indirect parameters
We had been papering over a problem with location info for non-trivial
types passed by value by emitting their type as references (this caused
the debugger to interpret the location information correctly, but broke
the type of the function). r183329 corrected the type information but
lead to the debugger interpreting the pointer parameter as the value -
the debug info describing the location needed an extra dereference.

Use a new flag in DIVariable to add the extra indirection (either by
promoting an existing DW_OP_reg (parameter passed in a register) to
DW_OP_breg + 0 or by adding DW_OP_deref to an existing DW_OP_breg + n
(parameter passed on the stack).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184368 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:55:13 +00:00
David Blaikie
c971cb8281 DebugInfo: Specify that a value is stored indirectly
This is a precursor to fix a regression caused by PR14763/r183329 where
the location of a non-trivial pass-by-value parameter ends up
incorrectly referring directly to the parameter (a pointer) rather than
the object pointed to by the pointer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184365 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:52:48 +00:00
David Blaikie
3df7d2f70b llvm-dwarfdump: Add support for dumping the .debug_loc section
This is a basic implementation - we still don't have any support (that I
know of) for dumping DWARF expressions in a meaningful way, so the
location information itself is just printed as a sequence of bytes as we
do elsewhere.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184361 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:37:13 +00:00
Bill Wendling
ba54bca472 Access the TargetLoweringInfo from the TargetMachine object instead of caching it. The TLI may change between functions. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184360 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:36:55 +00:00
Ulrich Weigand
4df4bccc71 [MC/DWARF] Generate multiple .debug_line entries for adjacent .loc directives
The compiler occasionally generates multiple .loc directives in a row
(at the same instruction address).  These need to be transformed into
multple actual .debug_line table entries, since they are used to signal
certain information to the debugger (e.g. if the opening brace of a
function body is on the same line as the declaration).

The MCAsmStreamer version of EmitDwarfLocDirective handles this
correctly by emitting a .loc directive every time it is called.
However, the MCObjectStream version simply defaults to recording
the information and emitting only a single table entry later,
e.g. when EmitInstruction is called.

This patch introduces a MCAsmStreamer::EmitDwarfLocDirective
version that emits a line table entry for a .loc directive
that may already be pending before recording the new directive.
(This is similar to how this is handled in GNU as.)

With this patch (and the code alignment factor patch) applied,
I'm now getting identical DWARF .debug sections for all test-suite
object files on PowerPC for the internal and the external assembler.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184357 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:27:27 +00:00
Michael Gottesman
07969dc8ae [APFloat] Converted all references to APFloat::isNormal => APFloat::isFiniteNonZero.
Turns out all the references were in llvm and not in clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184356 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:23:18 +00:00
Bill Wendling
f9fd58a44b Access the TargetLoweringInfo from the TargetMachine object instead of caching it. The TLI may change between functions. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184352 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:07:11 +00:00
Aaron Ballman
4655485eb7 Modified the implementation of fs::GetUniqueID on Windows such that it actually finds a unique identifier for a file. Also adds unit tests for GetUniqueID.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184351 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:03:50 +00:00
Michael Gottesman
7032c883cd [APFloat] Added isFiniteNonZero predicate.
This is the first patch in a series of patches to rename isNormal =>
isFiniteNonZero and isIEEENormal => isNormal. In order to prevent careless
errors on my part the overall plan is:

1. Add the isFiniteNonZero predicate with tests. I can do this in a method
independent of isNormal. (This step is this patch).
2. Convert all references to isNormal with isFiniteNonZero. My plan is to
comment out isNormal locally and continually convert isNormal references =>
isFiniteNonZero until llvm/clang compiles.
3. Remove old isNormal and rename isIEEENormal to isNormal.
4. Look through all of said references from patch 2 and see if we can simplify
them by using the new isNormal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184350 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:00:17 +00:00
Bill Wendling
ea44281d5d Access the TargetLoweringInfo from the TargetMachine object instead of caching it. The TLI may change between functions. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184349 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 20:51:24 +00:00
Bill Wendling
2e1dc2d265 Add operator!= as the compliment to operator==. This is for a future change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184348 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 20:50:12 +00:00
Bill Wendling
d626d33246 Don't cache the TLI object since we have access to it through TargetMachine already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184346 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 20:32:16 +00:00
Michael Gottesman
c896020dd8 [APFloat] Expose isSmallest/isLargest as public methods.
I have had several requests to expose these two methods as public for various
potential optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184345 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 20:31:54 +00:00
Matt Arsenault
ad966ea7a8 Move StructurizeCFG out of R600 to generic Transforms.
Register it with PassManager

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184343 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 20:18:24 +00:00
Rafael Espindola
7c8397081c Remove Path::getDirectoryContents.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184311 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 15:32:37 +00:00
Rafael Espindola
ca0984cb86 Remove Path::isObjectFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184305 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 14:25:38 +00:00
Rafael Espindola
f6f3be69d8 Remove Path::canExecute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184298 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 13:25:31 +00:00
Sean Silva
ea94e114b4 [yaml2obj][ELF] Support ELFOSABI_* enum.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184268 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 00:55:28 +00:00
Sean Silva
5ba1225fb0 [yaml2obj][ELF] Support st_info through Binding and Type YAML keys.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184263 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 00:11:59 +00:00
Sean Silva
afcf60fe15 [yaml2obj][ELF] Rudimentary symbol table support.
Currently, we only output the name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184255 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 23:14:03 +00:00
Rafael Espindola
1fbf3a3aca Remove Path::canWrite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184235 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 21:10:03 +00:00
Rafael Espindola
68ba1825fc Add a can_write function to PathV2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184233 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 20:56:38 +00:00
Rafael Espindola
f3426a482e Remove unused Path::canRead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184229 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 20:42:25 +00:00
Rafael Espindola
2e0f70bdd8 Remove uniqueID from PathV1.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184219 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 19:46:19 +00:00
Rafael Espindola
605510d16e Add a GetUniqueID that will replace the uniqueID of PathV1.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184217 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 19:34:49 +00:00
Rafael Espindola
8ee23f00c7 Add a version of unique_file that return just the file name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184206 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 17:01:00 +00:00
Alexey Samsonov
9c22f87b13 Basic support for parsing Mach-O universal binaries in LLVMObject library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184191 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 15:03:28 +00:00
Rafael Espindola
79ac9c8402 Don't convert object_error's enum to and from int.
This allows the compiler to see the enum and warn about it. While in here,
fix a switch to not use a default and fix style violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184186 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 13:30:31 +00:00
Bill Wendling
99cb622041 Use pointers to the MCAsmInfo and MCRegInfo.
Someone may want to do something crazy, like replace these objects if they
change or something.

No functionality change intended.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184175 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 07:20:20 +00:00
Chris Lattner
389ee19eab remove some @deprecated markers: LLVM APIs aren't deprecated, they are removed when obsolete.
These APIs are still used, and the constant APIs are actually really important.

Removing these makes -Wdocumentation more useful.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184170 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-18 04:57:25 +00:00
Bill Wendling
d10fa8b1ca Directly access objects which may change during compilation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184121 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-17 20:41:25 +00:00
Benjamin Kramer
4eed756153 Switch spill weights from a basic loop depth estimation to BlockFrequencyInfo.
The main advantages here are way better heuristics, taking into account not
just loop depth but also __builtin_expect and other static heuristics and will
eventually learn how to use profile info. Most of the work in this patch is
pushing the MachineBlockFrequencyInfo analysis into the right places.

This is good for a 5% speedup on zlib's deflate (x86_64), there were some very
unfortunate spilling decisions in its hottest loop in longest_match(). Other
benchmarks I tried were mostly neutral.

This changes register allocation in subtle ways, update the tests for it.
2012-02-20-MachineCPBug.ll was deleted as it's very fragile and the instruction
it looked for was gone already (but the FileCheck pattern picked up unrelated
stuff).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184105 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-17 19:00:36 +00:00
Rafael Espindola
68c0efac35 Don't use PathV1.h in LTOCodeGenerator.cpp
This patch also adds a simpler version of sys::fs::remove and a tool_output_file
constructor for when we already have an open file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184095 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-17 18:05:35 +00:00
Rafael Espindola
7d75760066 Delete declared but not implemented functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184087 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-17 17:15:00 +00:00
Rafael Espindola
8496faea07 Move lib/Archive to tools/llvm-ar.
llvm-ar is the only tool that needs to write archive files. Every other tool
should be able to use the lib/Object interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184083 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-17 15:47:20 +00:00
Tim Northover
7338de37a8 AArch64: print relocation addends if present on AArch64
llvm-objdump should provide some way of printing out the addends present in the
.rela sections for debugging purposes if nothing else.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184072 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-17 03:03:06 +00:00
David Blaikie
0187e7a9ba DebugInfo: remove target-specific Frame Index handling for DBG_VALUE MachineInstrs
Frame index handling is now target-agnostic, so delete the target hooks
for creation & asm printing of target-specific addressing in DBG_VALUEs
and any related functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184067 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-16 20:34:27 +00:00
David Blaikie
b7770e0b85 MachineOperand::setIsDebug should ensure the register is /not/ a definition
This currently unused function appeared to be asserting in the wrong
direction - DebugValues are never definitions of registers, only uses.
Curiously we don't perform any of these checks for the more common (&
actually used) case of MachineOperand::CreateReg (or other Create
functions).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184065 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-16 20:34:09 +00:00
Dmitri Gribenko
3018f0ddd4 Put back variable names because they are referenced in the documentation
comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184051 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-16 03:22:56 +00:00