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

866 Commits

Author SHA1 Message Date
Michael Ilseman
ae58e6368d Add -strip-nonlinetable-debuginfo capability
This adds a new function to DebugInfo.cpp that takes an llvm::Module
as input and removes all debug info metadata that is not directly
needed for line tables, thus effectively stripping all type and
variable information from the module.

The primary motivation for this feature was the bitcode work flow
(cf. http://lists.llvm.org/pipermail/llvm-dev/2016-June/100643.html
for more background). This is not wired up yet, but will be in
subsequent patches.  For testing, the new functionality is exposed to
opt with a -strip-nonlinetable-debuginfo option.

The secondary use-case (and one that works right now!) is as a
reduction pass in bugpoint. I added two new bugpoint options
(-disable-strip-debuginfo and -disable-strip-debug-types) to control
the new features. By default it will first attempt to remove all debug
information, then only the type info, and then proceed to hack at any
remaining MDNodes.

llvm-svn: 283473
2016-10-06 17:58:38 +00:00
Joerg Sonnenberger
b9a8936190 Retire bugpoint's -R. hack.
It got disconnected during the cmake conversion. For Miscompilation.cpp,
it was purely advisory for the user and the ToolRunner.cpp version was
trying to compensate for libs and bins in the same directory, which
hasn't been the case for a very long time.

llvm-svn: 283022
2016-10-01 07:34:18 +00:00
Joerg Sonnenberger
9d06fa6416 HAVE_LINK_R is not the only reason why this needs config.h.
llvm-svn: 282923
2016-09-30 20:11:21 +00:00
Mehdi Amini
3efb00834f Don't create a SymbolTable in Function when the LLVMContext discards value names (NFC)
The ValueSymbolTable is used to detect name conflict and rename
instructions automatically. This is not needed when the value
names are automatically discarded by the LLVMContext.
No functional change intended, just saving a little bit of memory.

This is a recommit of r281806 after fixing the accessor to return
a pointer instead of a reference and updating all the call-sites.

llvm-svn: 281813
2016-09-17 06:00:02 +00:00
Tobias Grosser
672d508b7d Ensure Polly linking works without BUILD_SHARED_LIBS
This change ensures all necessary symbols are resolved correctly. Before this
change on some systems, the linker may have eliminated some symbols not directly
used in bugpoint, but used in Polly.

Suggested-by: Michael Kruse <lvm@meinersbur.de>
llvm-svn: 281438
2016-09-14 03:09:48 +00:00
Justin Bogner
ed0c6b769f bugpoint: Return Errors instead of passing around strings
This replaces the threading of `std::string &Error` through all of
these APIs with checked Error returns instead. There are very few
places here that actually emit any errors right now, but threading the
APIs through will allow us to replace a bunch of exit(1)'s that are
scattered through this code with proper error handling.

This is more or less NFC, but does move around where a couple of error
messages are printed out.

llvm-svn: 280720
2016-09-06 17:18:22 +00:00
Justin Bogner
45a874b8d4 Revert "bugpoint: Stop threading errors through APIs that never fail"
This isn't the right thing to do - it turns out a number of the APIs
that "never fail" just exit(1) if something bad happens. We can and
should thread Error through this instead.

That diff will make more sense with this reverted. Sorry for the
noise.

This reverts r280690

llvm-svn: 280691
2016-09-06 04:45:37 +00:00
Justin Bogner
12cec98bae bugpoint: Stop threading errors through APIs that never fail
This simplifies ListReducer and most of its subclasses by removing the
std::string &Error that was threaded through all of them but almost
never used. If we end up needing error handling in more places here we
can reinstate it using llvm::Error instead of these unwieldy strings.

The 2 cases (out of 12) that actually can hit the error cases are a
little bit awkward now, but those will clean up as I refactor this API
further.

llvm-svn: 280690
2016-09-06 04:04:13 +00:00
Justin Bogner
2d09a9efc2 bugpoint: clang-format all of bugpoint. NFC
I'm going to clean up the APIs here a bit and touch many many lines
anyway.

llvm-svn: 280450
2016-09-02 01:21:37 +00:00
Justin Bogner
230cc9658d bugpoint: clang-format and modernize comments in ListReducer. NFC
llvm-svn: 280414
2016-09-01 21:04:36 +00:00
Chandler Carruth
90665f11d7 [PM] Port the always inliner to the new pass manager in a much more
minimal and boring form than the old pass manager's version.

This pass does the very minimal amount of work necessary to inline
functions declared as always-inline. It doesn't support a wide array of
things that the legacy pass manager did support, but is alse ... about
20 lines of code. So it has that going for it. Notably things this
doesn't support:

- Array alloca merging
  - To support the above, bottom-up inlining with careful history
    tracking and call graph updates
- DCE of the functions that become dead after this inlining.
- Inlining through call instructions with the always_inline attribute.
  Instead, it focuses on inlining functions with that attribute.

The first I've omitted because I'm hoping to just turn it off for the
primary pass manager. If that doesn't pan out, I can add it here but it
will be reasonably expensive to do so.

The second should really be handled by running global-dce after the
inliner. I don't want to re-implement the non-trivial logic necessary to
do comdat-correct DCE of functions. This means the -O0 pipeline will
have to be at least 'always-inline,global-dce', but that seems
reasonable to me. If others are seriously worried about this I'd like to
hear about it and understand why. Again, this is all solveable by
factoring that logic into a utility and calling it here, but I'd like to
wait to do that until there is a clear reason why the existing
pass-based factoring won't work.

The final point is a serious one. I can fairly easily add support for
this, but it seems both costly and a confusing construct for the use
case of the always inliner running at -O0. This attribute can of course
still impact the normal inliner easily (although I find that
a questionable re-use of the same attribute). I've started a discussion
to sort out what semantics we want here and based on that can figure out
if it makes sense ta have this complexity at O0 or not.

One other advantage of this design is that it should be quite a bit
faster due to checking for whether the function is a viable candidate
for inlining exactly once per function instead of doing it for each call
site.

Anyways, hopefully a reasonable starting point for this pass.

Differential Revision: https://reviews.llvm.org/D23299

llvm-svn: 278896
2016-08-17 02:56:20 +00:00
David Majnemer
85242fb9f9 Use the range variant of find instead of unpacking begin/end
If the result of the find is only used to compare against end(), just
use is_contained instead.

No functionality change is intended.

llvm-svn: 278433
2016-08-11 22:21:41 +00:00
David Majnemer
5937e5d842 [bugpoint] Add a -Os option
llvm-svn: 277295
2016-07-31 19:25:16 +00:00
Daniel Berlin
fe092dd00c Rework CFG simplification in bugpoint
Summary:
Depends on D22841

We now use a much simpler CFG simplification routine for bugpoint,
because SimplifyCFG is no longer a good match for what bugpoint wants
to do.

At the same time, to make sure we don't lose anything valuable it was doing,
SimplifyCFG is now run as a per-BB reduction pass.

With this and D22841 combined, bugpoint operates both much faster on
the large testcases i have, and reduces them to pretty much minimal
testcases (in one case, bugpoint used to leave about 6000 useless blocks, and
now it leaves 3 ...)

Reviewers: chandlerc, majnemer

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D22845

llvm-svn: 277063
2016-07-28 22:29:25 +00:00
Daniel Berlin
e32f43ef2c Make bugpoint transform conditional jumps into unconditional jumps.
Summary:
Add a pass to bugpoint to make it transform conditional jumps into unconditional jumps.

Often, bugpoint generates output that has large numbers of br undef jumps, where
one side is dead.

What is happening is two fold:
1. It never tries to just pick a direction for the jump, and just see what happens
<<<< this patch

2. SimplifyCFG no longer is a good match for bugpoint's usecase. It
does too much.
Even things in SimplifyCFG, like removeUnreachableBlocks, go to great
lengths to transform undefined behavior into  blocks and kill large
parts of the CFG.  This is great for regular code, not so much for
bugpoint, which often generates UB on purpose (store undef is a great
example).
<<<< a followup patch that is coming, to move simplifycfg into a
separate reduction pass, and move the existing reduceCrashingBlocks
pass to use simpleSimplifyCFG.

Both of these patches significantly reduce the size and complexity of bugpoint
generated testcases.

Reviewers: chandlerc, majnemer

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D22841

llvm-svn: 276884
2016-07-27 16:13:25 +00:00
Sebastian Pop
70a7aa9968 bugpoint: add flag -verbose-errors
The default behavior of bugpoint is to print "<crash>" when it finds a reduced
test that crashes compilation.  With this flag we now can see the output of the
crashing program.  This is useful to make sure it is the same error being
tracked down and not a different error that happens to crash the compiler as
well.

Differential Revision: https://reviews.llvm.org/D22411

llvm-svn: 275646
2016-07-15 23:15:06 +00:00
Philip Reames
bb2869fe21 [bugpoint] Delete a stale comment.
llvm-svn: 274093
2016-06-29 03:02:01 +00:00
Philip Reames
f5ddf407a2 [bugpoint] Unwrap one level of wrapper functions [NFC]
llvm-svn: 274092
2016-06-29 03:01:13 +00:00
Philip Reames
4503ee726b [bugpoint] Extract helper functions for readability [NFCI]
And remove the use of a label(!) in the process.  

llvm-svn: 274087
2016-06-29 00:43:18 +00:00
Philip Reames
c744416a3d [bugpoint] Simplify code by moving exception to only caller
llvm-svn: 274083
2016-06-29 00:26:21 +00:00
Philip Reames
861b808910 [bugpoint] Treat token type the same as ehpad w.r.t deletion
llvm-svn: 274082
2016-06-29 00:15:35 +00:00
Philip Reames
2afb693f4f [bugpoint] Disabling one transform shouldn't prevent reporting the progress of the former
llvm-svn: 274081
2016-06-29 00:10:39 +00:00
Justin Lebar
bb4e7aadbf [Bugpoint] Erase comdat annotations after removing a global's initializer.
Summary:
This is necessary to keep the verifier happy after bugpoint removes an
initializer from a global variable with a comdat annotation, because
globals without initializers may not have comdats.

Reviewers: majnemer, rnk

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D21274

llvm-svn: 272854
2016-06-15 23:20:12 +00:00
Richard Smith
f7f711ffaa Search for llvm-symbolizer binary in the same directory as argv[0], before
looking for it along $PATH. This allows installs of LLVM tools outside of
$PATH to find the symbolizer and produce pretty backtraces if they crash.

llvm-svn: 272232
2016-06-09 00:53:21 +00:00
Benjamin Kramer
d415569b3b Apply most suggestions of clang-tidy's performance-unnecessary-value-param
Avoids unnecessary copies. All changes audited & pass tests with asan.
No functional change intended.

llvm-svn: 272190
2016-06-08 19:09:22 +00:00
Benjamin Kramer
a855b3205f Apply clang-tidy's misc-move-constructor-init throughout LLVM.
No functionality change intended, maybe a tiny performance improvement.

llvm-svn: 270997
2016-05-27 14:27:24 +00:00
David Majnemer
d4258dce35 [GlobalDCE, Misc] Don't remove functions referenced by ifuncs
We forgot to consider the target of ifuncs when considering if a
function was alive or dead.

N.B. Also update a few auxiliary tools like bugpoint and
verify-uselistorder.

This fixes PR27593.

llvm-svn: 268468
2016-05-04 00:20:48 +00:00
Mehdi Amini
ea195a382e Remove every uses of getGlobalContext() in LLVM (but the C API)
At the same time, fixes InstructionsTest::CastInst unittest: yes
you can leave the IR in an invalid state and exit when you don't
destroy the context (like the global one), no longer now.

This is the first part of http://reviews.llvm.org/D19094

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 266379
2016-04-14 21:59:01 +00:00
Duncan P. N. Exon Smith
5e94641b4a ValueMapper: Add support for seeding metadata with nullptr
Support seeding a ValueMap with nullptr for Metadata entries, a
situation I didn't consider in the Metadata/Value split.

I added a ValueMapper::getMappedMD accessor that returns an
Optional<Metadata*> with the mapped (possibly null) metadata.  IRMover
needs to use this to avoid modifying the map when it's checking for
unneeded subprograms.  I updated a call from bugpoint since I find the
new code clearer.

llvm-svn: 265228
2016-04-02 17:04:38 +00:00
Adrian Prantl
ca27a73d17 Add an IR Verifier check for orphaned DICompileUnits.
A DICompileUnit that is not listed in llvm.dbg.cu will cause assertion
failures and/or crashes in the backend. The Verifier should reject this.

rdar://problem/25369499

llvm-svn: 264657
2016-03-28 21:06:26 +00:00
Eugene Zelenko
0ebce618ad Fix Clang-tidy readability-redundant-control-flow warnings; other minor fixes.
Differential revision: http://reviews.llvm.org/D16793

llvm-svn: 259539
2016-02-02 18:20:45 +00:00
Matthias Braun
882ae69776 Avoid overly large SmallPtrSet/SmallSet
These sets perform linear searching in small mode so it is never a good
idea to use SmallSize/N bigger than 32.

llvm-svn: 259283
2016-01-30 01:24:31 +00:00
Chris Bieneman
1b8d4f74aa Remove autoconf support
Summary:
This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html

"I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened."
- Obi Wan Kenobi

Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark

Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits

Differential Revision: http://reviews.llvm.org/D16471

llvm-svn: 258861
2016-01-26 21:29:08 +00:00
Rafael Espindola
f7a0054c75 Change linkInModule to take a std::unique_ptr.
Passing in a std::unique_ptr should help find errors when the module
is used after being linked into another module.

llvm-svn: 255842
2015-12-16 23:16:33 +00:00
Rafael Espindola
5b397256de Use diagnostic handler in the LLVMContext
This patch converts code that has access to a LLVMContext to not take a
diagnostic handler.

This has a few advantages

* It is easier to use a consistent diagnostic handler in a single program.
* Less clutter since we are not passing a handler around.

It does make it a bit awkward to implement some C APIs that return a
diagnostic string. I will propose new versions of these APIs and
deprecate the current ones.

llvm-svn: 255571
2015-12-14 23:17:03 +00:00
Rafael Espindola
d48cb08f15 Simplify testMergedProgram.
It now receives and returns std::unique_ptr.

llvm-svn: 255087
2015-12-09 00:55:05 +00:00
Rafael Espindola
25ea9f2b63 Simplify memory management. NFC.
This passes std::unique_ptr to predicates that are expected to delete
their argument.

llvm-svn: 255086
2015-12-09 00:51:06 +00:00
Rafael Espindola
8f77f17d0f Return std::unique_ptr from SplitFunctionsOutOfModule. NFC.
llvm-svn: 255084
2015-12-09 00:34:10 +00:00
Rafael Espindola
0f559f82b6 Simplify memory management. NFC.
llvm-svn: 255082
2015-12-09 00:18:41 +00:00
Rafael Espindola
510595dffd Simplify memory management a bit. NFC.
llvm-svn: 255079
2015-12-09 00:08:22 +00:00
Rafael Espindola
f20bc23b7c Return a std::unique_ptr from CloneModule. NFC.
llvm-svn: 255078
2015-12-08 23:57:17 +00:00
Rafael Espindola
2c7e9b8d27 Always pass a diagnostic handler to the linker.
Before this patch the diagnostic handler was optional. If it was not
passed, the one in the LLVMContext was used.

That is probably not a pattern we want to follow. If each area has an
optional callback, there is a sea of callbacks and it is hard to follow
which one is called.

Doing this also found cases where the callback is a nice addition, like
testing that no errors or warnings are reported.

The other option is to always use the diagnostic handler in the
LLVMContext. That has a few problems

* To implement the C API we would have to set the diag handler and then
  set it back to the original value.
* Code that creates the context might be far away from code that wants
  the diagnostics.

I do have a patch that implements the second option and will send that as
an RFC.

llvm-svn: 254777
2015-12-04 22:08:53 +00:00
Rafael Espindola
e3fda2ca99 Use references now that it is natural to do so.
The linker never takes ownership of a module or changes which module it
is refering to, making it natural to use references.

llvm-svn: 254449
2015-12-01 19:50:54 +00:00
Hal Finkel
2deea83231 [bugpoint] Fix "Alias must point to a definition" problems
GlobalAliases may reference function definitions, but not function declarations.

bugpoint would sometimes create invalid IR by deleting a function's body (thus
mutating a function definition into a declaration) without first 'fixing' any
GlobalAliases that reference that function definition.

This change iteratively prevents that issue. Before deleting a function's body,
it scans the module for GlobalAliases which reference that function. When
found, it eliminates them using replaceAllUsesWith.

Fixes PR20788.

Patch by Nick Johnson!

llvm-svn: 254171
2015-11-26 19:23:49 +00:00
David Majnemer
5efe6aaf0c Make bugpoint ehpad/token friendly
Tokens shouldn't be blindly replaced with undef/null.  Also, don't try
to remove EH pad instructions from the top of basic blocks.

llvm-svn: 252414
2015-11-08 04:16:12 +00:00
Keno Fischer
15297f1ae1 Fix bugpoint breakage on libcxx introduced by r252247
llvm-svn: 252253
2015-11-06 00:45:47 +00:00
Keno Fischer
b0714e5bf7 [bugpoint] Add a named metadata (+their operands) reducer
Summary:
We frequently run bugpoint on a linked module that consists of all
modules we create while jitting the julia standard library. This module
has a very large number of compile units (10000+) in `llvm.dbg.cu`,
which didn't get reduced at all, requiring manual post processing.
This is an attempt to have bugpoint go through and attempt to reduce
the number of global named metadata nodes as well as their operands,
to cut down the number of roots for such metadata.

Reviewers: dexonsmith, reames, pete

Subscribers: pete, dexonsmith, reames, llvm-commits

Differential Revision: http://reviews.llvm.org/D14043

llvm-svn: 252247
2015-11-06 00:12:50 +00:00
Duncan P. N. Exon Smith
cc73874cf4 bugpoint: Remove implicit ilist iterator conversions, NFC
This is the last of the implicit ilist iterator conversions in LLVM.
Still up for debate whether we let these bitrot back:
http://lists.llvm.org/pipermail/llvm-dev/2015-October/091617.html

llvm-svn: 250852
2015-10-20 19:36:39 +00:00
Davide Italiano
eac74efe76 [bugpoint] llvm-gcc doesn't exist anymore ...
... so this comment is stale. Remove it. Range-loopify while here.

llvm-svn: 250354
2015-10-15 01:12:01 +00:00
Davide Italiano
9fca22ddf4 [Bugpoint] Use 'CC' instead of 'GCC' for variable naming.
We now use clang by default and fallback to gcc when requested.
With this commit, names reflect reality. No functional change
intended.

Discussed with: Rafael Espindola.

llvm-svn: 250321
2015-10-14 20:29:54 +00:00
Davide Italiano
b2aad5775a [Bugpoint] Use clang by default.
We now rely on gcc only if either of the following is true:
1) -gcc option is passed by the user
2) clang is not found in the default path.

Differential Revision:	 http://reviews.llvm.org/D13642

llvm-svn: 250318
2015-10-14 19:48:01 +00:00
Davide Italiano
2fa01ffad6 [Bugpoint] Get rid of dead code. No functional change.
llvm-svn: 249999
2015-10-11 21:36:11 +00:00
David Majnemer
ee4740a5b5 Replace some calls to isa<LandingPadInst> with isEHPad()
No functionality change is intended.

llvm-svn: 245487
2015-08-19 19:54:02 +00:00
Chandler Carruth
bf271cc4e6 [PM/AA] Remove the last relics of the separate IPA library from LLVM,
folding the code into the main Analysis library.

There already wasn't much of a distinction between Analysis and IPA.
A number of the passes in Analysis are actually IPA passes, and there
doesn't seem to be any advantage to separating them.

Moreover, it makes it hard to have interactions between analyses that
are both local and interprocedural. In trying to make the Alias Analysis
infrastructure work with the new pass manager, it becomes particularly
awkward to navigate this split.

I've tried to find all the places where we referenced this, but I may
have missed some. I have also adjusted the C API to continue to be
equivalently functional after this change.

Differential Revision: http://reviews.llvm.org/D12075

llvm-svn: 245318
2015-08-18 17:51:53 +00:00
Tobias Grosser
db9fb1a6c9 bugpoint: make the number of trim iterations a compile-time constant
Around 10 year ago Chris limited this code to a single iteration by just
dropping a break into the loop body. We now make the number of trim iterations
a compile time constant to be able to play with it and see if this can
improve the bugpoint results. We currently use with '3' still a small and
conservative value, but this can be adjusted in the future, if needed.

I tried to look for a trivial test case, but did not succeed yet.

llvm-svn: 243247
2015-07-26 15:18:45 +00:00
Douglas Katzman
5eb858225c Wrap some long lines in LLVMBuild files. NFC
As suggested by jroelofs in a prior review (D9752),
it makes sense to generally prefer multi-line format.

llvm-svn: 239632
2015-06-12 18:44:57 +00:00
Benjamin Kramer
0e31955b32 Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types
If the type isn't trivially moveable emplace can skip a potentially
expensive move. It also saves a couple of characters.


Call sites were found with the ASTMatcher + some semi-automated cleanup.

memberCallExpr(
    argumentCountIs(1), callee(methodDecl(hasName("push_back"))),
    on(hasType(recordDecl(has(namedDecl(hasName("emplace_back")))))),
    hasArgument(0, bindTemporaryExpr(
                       hasType(recordDecl(hasNonTrivialDestructor())),
                       has(constructExpr()))),
    unless(isInTemplateInstantiation()))

No functional change intended.

llvm-svn: 238602
2015-05-29 19:43:39 +00:00
Daniel Sanders
0790458bde [bugpoint] Increase default memory limit to 400MB to fix bugpoint tests.
I tracked down the bug to an unchecked malloc in SmallVectorBase::grow_pod().
This malloc is returning NULL on my machine when running under bugpoint but not
when -enable-valgrind is given.

llvm-svn: 236504
2015-05-05 16:29:40 +00:00
JF Bastien
0078375e75 bugpoint Enhancement.
Summary:
This patch adds two flags to `bugpoint`: "-replace-funcs-with-null" and "-disable-pass-list-reduction".

When "-replace-funcs-with-null" is specified, bugpoint will, instead of simply deleting function bodies, replace all uses of functions and then will delete functions completely from the test module, correctly handling aliasing and @llvm.used && @llvm.compiler.used. This part was conceived while trying to debug the PNaCl IR simplification passes, which don't allow undefined functions (ie no declarations).

With "-disable-pass-list-reduction", bugpoint won't try to reduce the set of passes causing the "crash". This is needed in cases where one is trying to debug an issue inside the PNaCl IR simplification passes which is causing an PNaCl ABI verification error, for example.

Reviewers: jfb

Reviewed By: jfb

Subscribers: jfb, llvm-commits

Differential Revision: http://reviews.llvm.org/D8555

llvm-svn: 235362
2015-04-20 23:42:22 +00:00
Duncan P. N. Exon Smith
8654474680 uselistorder: Remove the global bits
Remove all the global bits to do with preserving use-list order by
moving the `cl::opt`s to the individual tools that want them.  There's a
minor functionality change to `libLTO`, in that you can't send in
`-preserve-bc-uselistorder=false`, but making that bit settable (if it's
worth doing) should be through explicit LTO API.

As a drive-by fix, I removed some includes of `UseListOrder.h` that were
made unnecessary by recent commits.

llvm-svn: 234973
2015-04-15 03:14:06 +00:00
Duncan P. N. Exon Smith
b222408637 uselistorder: Pull the bit through WriteToBitcodFile()
Change the callers of `WriteToBitcodeFile()` to pass `true` or
`shouldPreserveBitcodeUseListOrder()` explicitly.  I left the callers
that want to send `false` alone.

I'll keep pushing the bit higher until hopefully I can delete the global
`cl::opt` entirely.

llvm-svn: 234957
2015-04-15 00:10:50 +00:00
Duncan P. N. Exon Smith
a8fd793406 IR: Set -preserve-bc-uselistorder=false by default
But keep it on by default in `llvm-as`, `opt`, `bugpoint`, `llvm-link`,
`llvm-extract`, and `LTOCodeGenerator`.  Part of PR5680.

llvm-svn: 234921
2015-04-14 18:33:00 +00:00
Alexander Kornienko
71412ece39 Use 'override/final' instead of 'virtual' for overridden methods
The patch is generated using clang-tidy misc-use-override check.

This command was used:

  tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \
    -checks='-*,misc-use-override' -header-filter='llvm|clang' \
    -j=32 -fix -format

http://reviews.llvm.org/D8925

llvm-svn: 234679
2015-04-11 02:11:45 +00:00
David Blaikie
f300e9b75c [opaque pointer type] API migration for GEP constant factories
Require the pointee type to be passed explicitly and assert that it is
correct. For now it's possible to pass nullptr here (and I've done so in
a few places in this patch) but eventually that will be disallowed once
all clients have been updated or removed. It'll be a long road to get
all the way there... but if you have the cahnce to update your callers
to pass the type explicitly without depending on a pointer's element
type, that would be a good thing to do soon and a necessary thing to do
eventually.

llvm-svn: 233938
2015-04-02 18:55:32 +00:00
Duncan P. N. Exon Smith
cd3df9500c tools: Unify how verifyModule() is called
Unify the error messages for the various tools when `verifyModule()`
fails on an input module.  The "brave new way" is:

    lltool: path/to/input.ll: error: input module is broken!

llvm-svn: 233667
2015-03-31 03:07:23 +00:00
Duncan P. N. Exon Smith
11f7c4e461 bugpoint: Verify input files
Like r233229 for `llvm-link`, start verifying input files to `bugpoint`.

llvm-svn: 233253
2015-03-26 05:03:10 +00:00
Duncan P. N. Exon Smith
fd501e4fda bugpoint: Return early after error, NFC
llvm-svn: 233252
2015-03-26 05:03:06 +00:00
Duncan P. N. Exon Smith
57ccff4630 Verifier: Remove the separate -verify-di pass
Remove `DebugInfoVerifierLegacyPass` and the `-verify-di` pass.
Instead, call into the `DebugInfoVerifier` from inside
`VerifierLegacyPass::finalizeModule()`.  This better matches the logic
in `verifyModule()` (used by the new PassManager), avoids requiring two
separate passes to verify the IR, and makes the API for "add a pass to
verify the IR" simple.

Note: the `-verify-debug-info` flag still works (for now, at least;
eventually it might make sense to just remove it).

llvm-svn: 232772
2015-03-19 22:24:17 +00:00
Reid Kleckner
8387c0d5ea CMake: Disable ENABLE_EXPORTS for executables with MSVC
The MSVC linker won't produce a .lib file for an executable that doesn't
export anything, and LLVM doesn't maintain dllexport annotations or .def
files listing all C++ symbols. It also doesn't support exporting all
symbols, like binutils ld.

CMake 3.2 changed the Ninja generator to list both the .exe and .lib
files as outputs of executable build targets. Ninja would always re-link
executables with ENABLE_EXPORTS because the .lib output file was not
present, and therefore the target was out of date.

llvm-svn: 232662
2015-03-18 20:09:13 +00:00
Yaron Keren
39596543fc Teach raw_ostream to accept SmallString.
Saves adding .str() call to any raw_ostream << SmallString usage
and a small step towards making .str() consistent in the ADTs by
removing one of the SmallString::str() use cases, discussion at

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20141013/240026.html

I'll update the Phabricator patch http://reviews.llvm.org/D6372
for review of the Twine SmallString support, it's more complex
than this one.

llvm-svn: 231763
2015-03-10 07:33:23 +00:00
David Majnemer
6a0039a013 Replace a few instances of NULL with nullptr.
llvm-svn: 230599
2015-02-26 01:10:49 +00:00
Chandler Carruth
18e8c62883 [PM] Remove the old 'PassManager.h' header file at the top level of
LLVM's include tree and the use of using declarations to hide the
'legacy' namespace for the old pass manager.

This undoes the primary modules-hostile change I made to keep
out-of-tree targets building. I sent an email inquiring about whether
this would be reasonable to do at this phase and people seemed fine with
it, so making it a reality. This should allow us to start bootstrapping
with modules to a certain extent along with making it easier to mix and
match headers in general.

The updates to any code for users of LLVM are very mechanical. Switch
from including "llvm/PassManager.h" to "llvm/IR/LegacyPassManager.h".
Qualify the types which now produce compile errors with "legacy::". The
most common ones are "PassManager", "PassManagerBase", and
"FunctionPassManager".

llvm-svn: 229094
2015-02-13 10:01:29 +00:00
Michael J. Spencer
6a5243a18f Fix style.
llvm-svn: 221547
2014-11-07 21:30:36 +00:00
Michael J. Spencer
17a3ab5413 Use findProgramByName.
llvm-svn: 221221
2014-11-04 01:29:59 +00:00
Rafael Espindola
fc1860dc1f Remove the PreserveSource linker mode.
I noticed that it was untested, and forcing it on caused some tests to fail:

    LLVM :: Linker/metadata-a.ll
    LLVM :: Linker/prefixdata.ll
    LLVM :: Linker/type-unique-odr-a.ll
    LLVM :: Linker/type-unique-simple-a.ll
    LLVM :: Linker/type-unique-simple2-a.ll
    LLVM :: Linker/type-unique-simple2.ll
    LLVM :: Linker/type-unique-type-array-a.ll
    LLVM :: Linker/unnamed-addr1-a.ll
    LLVM :: Linker/visibility1.ll

If it is to be resurrected, it has to be fixed and we should probably have a
-preserve-source command line option in llvm-mc and run tests with and without
it.

llvm-svn: 220741
2014-10-28 00:24:16 +00:00
Rafael Espindola
67b4b608c2 Update the error handling of lib/Linker.
Instead of passing a std::string&, use the new diagnostic infrastructure.

llvm-svn: 220608
2014-10-25 04:06:10 +00:00
Rafael Espindola
253081a9b6 Delete -std-compile-opts.
These days -std-compile-opts was just a silly alias for -O3.

llvm-svn: 219951
2014-10-16 20:00:02 +00:00
Lang Hames
76198e6483 [Bugpoint] Close error log in ProcessFailure. Bugpoint had been failing to close
this, and in some circumstances (e.g. reducing particularly large test-cases)
this was causing bugpoint to be killed for hitting open file-handle limits.

No test case: I was only able to trigger this with test cases taking upwards of
10 mins to run.

llvm-svn: 219244
2014-10-07 21:47:23 +00:00
Rafael Espindola
5d3991396a Return a std::unique_ptr from the IRReader.h functions. NFC.
llvm-svn: 216466
2014-08-26 17:29:46 +00:00
Rafael Espindola
7c0442fa71 Return a std::unique_ptr from parseInputFile and propagate. NFC.
The memory management in BugPoint is fairly convoluted, so this just unwraps
one layer by changing the return type of functions that always return
owned Modules.

llvm-svn: 216464
2014-08-26 17:19:03 +00:00
Rafael Espindola
1d5713d9bf Modernize raw_fd_ostream's constructor a bit.
Take a StringRef instead of a "const char *".
Take a "std::error_code &" instead of a "std::string &" for error.

A create static method would be even better, but this patch is already a bit too
big.

llvm-svn: 216393
2014-08-25 18:16:47 +00:00
Craig Topper
c2e0ae6754 Use range based for loops to avoid needing to re-mention SmallPtrSet size.
llvm-svn: 216351
2014-08-24 23:23:06 +00:00
Rafael Espindola
dd478b7122 Handle inlining in populateLTOPassManager like in populateModulePassManager.
No functionality change.

llvm-svn: 216178
2014-08-21 13:35:30 +00:00
Rafael Espindola
f79b5bf8bb Move DisableGVNLoadPRE from populateLTOPassManager to PassManagerBuilder.
llvm-svn: 216174
2014-08-21 13:13:17 +00:00
Benjamin Kramer
da144ed5a2 Canonicalize header guards into a common format.
Add header guards to files that were missing guards. Remove #endif comments
as they don't seem common in LLVM (we can easily add them back if we decide
they're useful)

Changes made by clang-tidy with minor tweaks.

llvm-svn: 215558
2014-08-13 16:26:38 +00:00
Rafael Espindola
e145188cc8 Don't internalize all but main by default.
This is mostly a cleanup, but it changes a fairly old behavior.

Every "real" LTO user was already disabling the silly internalize pass
and creating the internalize pass itself. The difference with this
patch is for "opt -std-link-opts" and the C api.

Now to get a usable behavior out of opt one doesn't need the funny
looking command line:

opt -internalize -disable-internalize -internalize-public-api-list=foo,bar -std-link-opts

llvm-svn: 214919
2014-08-05 20:10:38 +00:00
Duncan P. N. Exon Smith
2ae51d315c Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges."
This reverts commit r213474 (and r213475), which causes a miscompile on
a stage2 LTO build.  I'll reply on the list in a moment.

llvm-svn: 213562
2014-07-21 17:06:51 +00:00
Manuel Jacob
8e924ddc40 [C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges.
Summary: This patch introduces two new iterator ranges and updates existing code to use it.  No functional change intended.

Test Plan: All tests (make check-all) still pass.

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D4481

llvm-svn: 213474
2014-07-20 09:10:11 +00:00
NAKAMURA Takumi
b6f6f54bac bugpoint/ToolRunner.cpp: ProcessFailure(): Close ErrorFD immediately, or it couldn't be reopened on Win32.
FIXME: We may have an option in openFileForWrite(), not to use ResultFD but to close it.
llvm-svn: 212902
2014-07-13 13:28:18 +00:00
Rafael Espindola
5c15b3d369 Remove 'using std::error_code' from tools.
llvm-svn: 210876
2014-06-13 03:07:50 +00:00
Rafael Espindola
e0e308ff6d Don't use 'using std::error_code' in include/llvm.
This should make sure that most new uses use the std prefix.

llvm-svn: 210835
2014-06-12 21:46:39 +00:00
Craig Topper
b663bffa27 [C++] Use 'nullptr'.
llvm-svn: 207394
2014-04-28 04:05:08 +00:00
David Blaikie
c83e70bec0 BugPoint: Fix some memory leaks.
Patch by Kostya Serebryany.

unique_ptr would be nice, but it's a bit too much work for an area I'm
not familiar with, nor invested in, unfortunately.

llvm-svn: 207265
2014-04-25 20:15:16 +00:00
Craig Topper
0e2ab5732c [C++] Use 'nullptr'. Tools edition.
llvm-svn: 207176
2014-04-25 04:24:47 +00:00
Chandler Carruth
237fe5f5d8 [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE
definition below all of the header #include lines, tools edition.

llvm-svn: 206848
2014-04-22 03:10:36 +00:00
Chandler Carruth
15c7b91ac2 [Modules] Make Support/Debug.h modular. This requires it to not change
behavior based on other files defining DEBUG_TYPE, which means it cannot
define DEBUG_TYPE at all. This is actually better IMO as it forces folks
to define relevant DEBUG_TYPEs for their files. However, it requires all
files that currently use DEBUG(...) to define a DEBUG_TYPE if they don't
already. I've updated all such files in LLVM and will do the same for
other upstream projects.

This still leaves one important change in how LLVM uses the DEBUG_TYPE
macro going forward: we need to only define the macro *after* header
files have been #include-ed. Previously, this wasn't possible because
Debug.h required the macro to be pre-defined. This commit removes that.
By defining DEBUG_TYPE after the includes two things are fixed:

- Header files that need to provide a DEBUG_TYPE for some inline code
  can do so by defining the macro before their inline code and undef-ing
  it afterward so the macro does not escape.

- We no longer have rampant ODR violations due to including headers with
  different DEBUG_TYPE definitions. This may be mostly an academic
  violation today, but with modules these types of violations are easy
  to check for and potentially very relevant.

Where necessary to suppor headers with DEBUG_TYPE, I have moved the
definitions below the includes in this commit. I plan to move the rest
of the DEBUG_TYPE macros in LLVM in subsequent commits; this one is big
enough.

The comments in Debug.h, which were hilariously out of date already,
have been updated to reflect the recommended practice going forward.

llvm-svn: 206822
2014-04-21 22:55:11 +00:00
Duncan P. N. Exon Smith
58154f2238 verify-di: Implement DebugInfoVerifier
Implement DebugInfoVerifier, which steals verification relying on
DebugInfoFinder from Verifier.

  - Adds LegacyDebugInfoVerifierPassPass, a ModulePass which wraps
    DebugInfoVerifier.  Uses -verify-di command-line flag.

  - Change verifyModule() to invoke DebugInfoVerifier as well as
    Verifier.

  - Add a call to createDebugInfoVerifierPass() wherever there was a
    call to createVerifierPass().

This implementation as a module pass should sidestep efficiency issues,
allowing us to turn debug info verification back on.

<rdar://problem/15500563>

llvm-svn: 206300
2014-04-15 16:27:38 +00:00
Rafael Espindola
91e062e33e Fix a bug introduced during the transition to PathV2.
sys::fs::createUniqueFile returns an absolute path, so MakeSharedObject does
too and we don't need to add a './' prefix.

Patch by Jon McLachlan.

llvm-svn: 203931
2014-03-14 15:13:35 +00:00
Sebastian Pop
420901fde5 static link polly into tools
llvm-svn: 203886
2014-03-14 04:04:14 +00:00
Craig Topper
76695802bd [C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203345
2014-03-08 08:27:28 +00:00
Adam Nemet
b9548bb3f2 [bugpoint] Don't ignore arg in -compile-commad="tool arg"
Args is an output parameter of the function lexCommand but the reference
operator was missed.

llvm-svn: 203343
2014-03-08 07:48:19 +00:00
Ahmed Charles
52ce0c101e Replace OwningPtr<T> with std::unique_ptr<T>.
This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which have OwningPtr's as parameters. This should allow out of tree
projects some time to move. There are also no changes to libs/Target,
which should help out of tree targets have time to move, if necessary.

llvm-svn: 203083
2014-03-06 05:51:42 +00:00
Chandler Carruth
a799485f06 [Layering] Sink Linker.h into a Linker subdirectory to make it
consistent with every other sub-library header in LLVM.

llvm-svn: 203065
2014-03-06 03:42:23 +00:00
Ahmed Charles
4a96a15754 [C++11] Replace OwningPtr::take() with OwningPtr::release().
llvm-svn: 202957
2014-03-05 10:19:29 +00:00
Chandler Carruth
1de9b1763e [Modules] Move the PassNameParser to the IR library as it deals in the
PassInfo structures of the legacy pass manager. Also give it the Legacy
prefix as it is not a particularly widely used header.

llvm-svn: 202839
2014-03-04 12:32:42 +00:00
Chandler Carruth
075812f27c [Modules] Move CFG.h to the IR library as it defines graph traits over
IR types.

llvm-svn: 202827
2014-03-04 11:45:46 +00:00
Chandler Carruth
63713e9f95 [Modules] Move ValueMap to the IR library. While this class does not
directly care about the Value class (it is templated so that the key can
be any arbitrary Value subclass), it is in fact concretely tied to the
Value class through the ValueHandle's CallbackVH interface which relies
on the key type being some Value subclass to establish the value handle
chain.

Ironically, the unittest is already in the right library.

llvm-svn: 202824
2014-03-04 11:26:31 +00:00
Rafael Espindola
d89ca7eab7 Replace the F_Binary flag with a F_Text one.
After this I will set the default back to F_None. The advantage is that
before this patch forgetting to set F_Binary would corrupt a file on windows.
Forgetting to set F_Text produces one that cannot be read in notepad, which
is a better failure mode :-)

llvm-svn: 202052
2014-02-24 18:20:12 +00:00
Quentin Colombet
fc711dd23c [CodeGenPrepare] Move CodeGenPrepare into lib/CodeGen.
CodeGenPrepare uses extensively TargetLowering which is part of libLLVMCodeGen.
This is a layer violation which would introduce eventually a dependence on
CodeGen in ScalarOpts.

Move CodeGenPrepare into libLLVMCodeGen to avoid that.

Follow-up of <rdar://problem/15519855>

llvm-svn: 201912
2014-02-22 00:07:45 +00:00
Tobias Grosser
ccc79e1f2b Fix typo
Found by: Duncan P. N. Exon Smith <dexonsmith@apple.com>

llvm-svn: 201726
2014-02-19 22:16:49 +00:00
Tobias Grosser
81ff43601d Do not reference llvm-gcc from bugpoint
Reiterating: llvm-gcc is dead since a long time.
llvm-svn: 200220
2014-01-27 13:44:58 +00:00
NAKAMURA Takumi
aa02be00a1 Whitespace.
llvm-svn: 199305
2014-01-15 08:21:38 +00:00
Chandler Carruth
ee051af6e2 [cleanup] Move the Dominators.h and Verifier.h headers into the IR
directory. These passes are already defined in the IR library, and it
doesn't make any sense to have the headers in Analysis.

Long term, I think there is going to be a much better way to divide
these matters. The dominators code should be fully separated into the
abstract graph algorithm and have that put in Support where it becomes
obvious that evn Clang's CFGBlock's can use it. Then the verifier can
manually construct dominance information from the Support-driven
interface while the Analysis library can provide a pass which both
caches, reconstructs, and supports a nice update API.

But those are very long term, and so I don't want to leave the really
confusing structure until that day arrives.

llvm-svn: 199082
2014-01-13 09:26:24 +00:00
Chandler Carruth
53468087f3 Put the functionality for printing a value to a raw_ostream as an
operand into the Value interface just like the core print method is.
That gives a more conistent organization to the IR printing interfaces
-- they are all attached to the IR objects themselves. Also, update all
the users.

This removes the 'Writer.h' header which contained only a single function
declaration.

llvm-svn: 198836
2014-01-09 02:29:41 +00:00
Chandler Carruth
7aa902a488 Move the LLVM IR asm writer header files into the IR directory, as they
are part of the core IR library in order to support dumping and other
basic functionality.

Rename the 'Assembly' include directory to 'AsmParser' to match the
library name and the only functionality left their -- printing has been
in the core IR library for quite some time.

Update all of the #includes to match.

All of this started because I wanted to have the layering in good shape
before I started adding support for printing LLVM IR using the new pass
infrastructure, and commandline support for the new pass infrastructure.

llvm-svn: 198688
2014-01-07 12:34:26 +00:00
Nico Weber
e7bb9e41e0 Port r198087 and r198089 (strip dead code by default) from make to cmake.
llvm-svn: 198198
2013-12-30 03:36:05 +00:00
Nico Weber
0b5179242e Strip dead code when linking by default with BFD ld (linux, ...) and ld64 (os x).
This reduces the size of clang-format from 22 MB to 1.8 MB, diagtool goes from
21 MB to 2.8 MB, libclang.so goes from 29 MB to 20 MB, etc.  The size of the
bin/ folder shrinks from 270 MB to 200 MB.

Targets that support plugins and don't already use EXPORTED_SYMBOL_FILE
(which libclang and libLTO already do) can set NO_DEAD_STRIP to opt out.

llvm-svn: 198087
2013-12-27 22:38:59 +00:00
NAKAMURA Takumi
955efe24ce [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.
llvm-svn: 196908
2013-12-10 11:13:32 +00:00
Jakub Staszak
a0334b429e Use startswith_lower() where possible.
llvm-svn: 194007
2013-11-04 19:22:50 +00:00
Daniel Sanders
fa62351fd5 [bugpoint] Increase the default memory limit for subprocesses to 300MB.
Summary:
Currently shared library builds (BUILD_SHARED_LIBS=ON in cmake) fail three
bugpoint tests (BugPoint/remove_arguments_test.ll,
BugPoint/crash-narrowfunctiontest.ll, and BugPoint/metadata.ll).

If I run the bugpoint commands that llvm-lit runs with without -silence-passes
I see errors such as this:
    opt: error while loading shared libraries: libLLVMSystemZInfo.so: failed to
    map segment from shared object: Cannot allocate memory

It seems that the increased size of the binaries in a shared library build is
causing the subprocess to exceed the 100MB memory limit. This patch therefore
increases the default limit to a level at which these tests pass.

Reviewers: dsanders

Reviewed By: dsanders

CC: llvm-commits, rafael

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

llvm-svn: 193420
2013-10-25 17:41:41 +00:00
Rafael Espindola
a279462828 Remove several unused variables.
Patch by Alp Toker.

llvm-svn: 191757
2013-10-01 13:32:03 +00:00
Dmitri Gribenko
3c784ef695 Added std:: qualifier to find() invocation
Iterator of std::vector may be implemented as a raw pointer. In
this case ADL does not find the find() function in the std namespace.
For example, this is the case with STDCXX implementation of vector.

Patch by Konstantin Tokarev.

llvm-svn: 189733
2013-09-02 01:18:56 +00:00
Michael Gottesman
9c47125a1e [bugpoint] Allow the user to specify the path to opt on the commandline.
llvm-svn: 187739
2013-08-05 21:07:07 +00:00
Hal Finkel
0047fe7d03 Fix invalid function pointers in bugpoint ExtractLoops
The ExtractLoops function tries to reduce the failing test case by extracting
one or more loops from the misoptimized piece of the program. In doing this,
ExtractLoops must keep the MiscompiledFunctions vector up-to-date by ensuring
that the pointers refer to functions in the current failing program.
Unfortunately, this is not trivial because:

 - ExtractLoops is iterative, and there are several early exits (and the
   MiscompiledFunctions vector must be consistent with the current program at
every non-fatal exit point).
 - Several of the utility functions used by ExtractLoops (such as
   TestOptimizer, some of which are called through the TestFn callback
parameter, and Linker::LinkModules) delete their inputs upon success.

This change adds several updates of the MiscompiledFunctions vector at
different points. The first is after the initial call to TestMergedProgram
which checks that the loop-extracted program still works. The second is after
the call to TestFn (TestOptimizer, for example). This function will delete its
inputs (which is why the existing ExtractLoops logic cloned the inputs first).

llvm-svn: 187674
2013-08-02 21:13:42 +00:00
Rafael Espindola
2a9326a78f Add a wrapper for open.
This centralizes the handling of O_BINARY and opens the way for hiding more
differences (like how open behaves with directories).

llvm-svn: 186447
2013-07-16 19:44:17 +00:00
Rafael Espindola
66da97e093 Add a createUniqueFile function and switch llvm's users of unique_file.
This function is complementary to createTemporaryFile. It handles the case were
the unique file is *not* temporary: we will rename it in the end. Since we
will rename it, the file has to be in the same filesystem as the final
destination and we don't prepend the system temporary directory.

This has a small semantic difference from unique_file: the default mode is 0666.
This matches the behavior of most unix tools. For example, with this change
lld now produces files with the same permissions as ld. I will add a test
of this change when I port clang over to createUniqueFile (next commit).

llvm-svn: 185726
2013-07-05 21:01:08 +00:00
Rafael Espindola
d6fa9469ca Use sys::fs::createTemporaryFile.
llvm-svn: 185719
2013-07-05 20:14:52 +00:00
Hal Finkel
461bd33944 Fix bugpoint execution/reference output file name
sys::fs::unique_file will now loop infinitely if provided with a file name
without '%' characters and the input file already exists. As a result, bugpoint
cannot use a fixed file name for the execution output (including the reference
output).

llvm-svn: 185166
2013-06-28 16:37:52 +00:00
Rafael Espindola
50996b2c4d Remove unused includes.
llvm itself is now PathV1 clean.

llvm-svn: 184947
2013-06-26 13:54:34 +00:00
Rafael Espindola
07ffa7d08b Port GetMainExecutable over to PathV2.
I will remove the V1 version as soon as I change clang in the next commit.

llvm-svn: 184914
2013-06-26 05:01:35 +00:00
Rafael Espindola
4ff51c0bcf Move GetEXESuffix to the one place it is used.
llvm-svn: 184853
2013-06-25 14:42:30 +00:00
Rafael Espindola
7f5c2666a5 Convert most uses of PathV1.h in ToolRunner.cpp.
llvm-svn: 184210
2013-06-18 17:20:08 +00:00
Rafael Espindola
18bf1abdc7 Add a version of unique_file that return just the file name.
llvm-svn: 184206
2013-06-18 17:01:00 +00:00
Rafael Espindola
ba9d8abd28 Return a std::string from PrependMainExecutablePath.
llvm-svn: 184204
2013-06-18 16:47:55 +00:00
Rafael Espindola
45e04133bf Remove PathV1.h use from BugDriver.cpp.
llvm-svn: 184203
2013-06-18 16:21:54 +00:00
Rafael Espindola
14b5a763c3 Remove use of PathV1.h from ExecutionDriver.cpp.
llvm-svn: 184202
2013-06-18 16:14:09 +00:00
Rafael Espindola
8e7f40cca7 Remove usage of PathV1.h from OptimizerDriver.cpp.
llvm-svn: 184198
2013-06-18 15:54:13 +00:00
Rafael Espindola
3fc12d72c3 Convert some uses of eraseFromDisk.
llvm-svn: 184196
2013-06-18 15:33:18 +00:00
Rafael Espindola
8cdee56810 Don't use PathV1.h in tools/bugpoint/Miscompilation.cpp.
llvm-svn: 184193
2013-06-18 15:29:32 +00:00
Rafael Espindola
6a07fa8287 Convert two uses of eraseFromDisk.
llvm-svn: 184136
2013-06-17 21:50:28 +00:00
Rafael Espindola
f67941b9b1 Remove usage of PathV1.h in FindBugs.cpp.
llvm-svn: 184122
2013-06-17 20:48:36 +00:00
Rafael Espindola
95d3811592 Don't use PathV1.h in CrashDebugger.cpp.
llvm-svn: 184109
2013-06-17 19:33:18 +00:00
Rafael Espindola
fcae6ace8a Don't use PathV1.h in ToolRunner.h.
llvm-svn: 184107
2013-06-17 19:21:38 +00:00
Rafael Espindola
dc36acbad8 Remove CBE related code.
llvm-svn: 184106
2013-06-17 19:03:02 +00:00
Rafael Espindola
777fff797b Don't use PathV1.h in ExtractFunction.cpp.
llvm-svn: 184102
2013-06-17 18:48:59 +00:00
Rafael Espindola
703b03a992 Move PrependMainExecutablePath next to its only user.
llvm-svn: 183980
2013-06-14 15:12:13 +00:00
Rafael Espindola
6c0ca078e2 Don't use PathV1.h in Signals.h.
llvm-svn: 183947
2013-06-13 21:16:58 +00:00
Rafael Espindola
1cc376fe6a Don't use PathV1.h in FileUtilities.h.
llvm-svn: 183941
2013-06-13 20:41:00 +00:00
Rafael Espindola
ef0d0d8b0b Avoid using PathV1.h in Program.h.
llvm-svn: 183940
2013-06-13 20:25:38 +00:00
Rafael Espindola
332b3ad6f7 Have sys::FindProgramByName return a std::string.
llvm-svn: 183928
2013-06-13 19:25:37 +00:00