Commit Graph

3197 Commits

Author SHA1 Message Date
Owen Anderson
90c579de5a Reapply r110396, with fixes to appease the Linux buildbot gods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-06 18:33:48 +00:00
Owen Anderson
1f74590e9d Revert r110396 to fix buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-06 00:23:35 +00:00
Owen Anderson
9ccaf53ada Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
ID member as the sole unique type identifier.  Clean up APIs related to this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 23:42:04 +00:00
Bob Wilson
b8be03b0e4 Revert bugpoint change due to buildbot breakage.
--- Reverse-merging r110333 into '.':
U    tools/bugpoint/BugDriver.h
U    tools/bugpoint/OptimizerDriver.cpp
U    tools/bugpoint/bugpoint.cpp
U    tools/bugpoint/BugDriver.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110341 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 16:26:32 +00:00
Rafael Espindola
d02dc8d096 Run opt instead of bugpoint itself.
Fixes PR753.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110333 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 15:25:38 +00:00
Rafael Espindola
248d1c65f1 Add const to compileProgram and to the various test functions in CrashDebugger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110306 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 03:00:22 +00:00
Rafael Espindola
5d8cace94a Add a Module argument to the remaining runPasses methods and mark getContext
const.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110300 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 02:16:32 +00:00
Rafael Espindola
ca356afe09 Make EmitProgressBitcode const and add a Module argument to runPasses. Use
that argument to simplify runPassesOn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110291 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 00:29:04 +00:00
Daniel Dunbar
b259c01376 build: Don't pass -avoid-version or -no-undefined on Darwin, they don't do
anything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109957 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-31 21:32:56 +00:00
Michael J. Spencer
7c380eded5 llc: Add -mc-relax-all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109954 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-31 19:57:02 +00:00
Rafael Espindola
13793264e7 Add const to some methods and change TestMergedProgram to return the merged
module and take a const BugDriver.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109951 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-31 14:34:49 +00:00
Rafael Espindola
d720670393 The BlockExtractorPass() constructor was not reading the BlockFile and that was
exactly what bugpoint expected it to do.

There was also only one user of
BlockExtractorPass(const std::vector<BasicBlock*> &B), so just remove it and
make BlockExtractorPass read BlockFile.

This fixes bugpoint's block extraction.

Nick, please review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109936 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-31 00:32:17 +00:00
Rafael Espindola
10757dd8e1 Add a Program argument to diffProgram to avoid a use of swapProgramIn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109859 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30 14:19:00 +00:00
Duncan Sands
80a098583b Do not pass a copy of the value map, pass a reference to it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109852 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30 05:50:45 +00:00
John McCall
44a9860247 Transcribe IRC to svn. Also don't print basic block names twice if they match.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109787 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 18:20:13 +00:00
John McCall
73b21b738e Make the header self-contained and follow #include guidelines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109774 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 18:08:23 +00:00
John McCall
e5cbaf140b Switch to using the LLVM CommandLine library so that our help
message is properly contaminated with nonsense about timing passes
that doesn't apply at all to this utility. :)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109769 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 17:55:00 +00:00
Benjamin Kramer
1abcd06856 Plug the remaining MC leaks by giving MCObjectStreamer/MCAsmStreamer ownership of the TargetAsmBackend and the MCCodeEmitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109767 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 17:48:06 +00:00
Rafael Espindola
115a932eb9 Make the test while reducing blocks functional. This avoids accessing freed
memory when one of the original BB is destroyed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109747 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 14:20:59 +00:00
John McCall
82bd5eaa71 Centralize the logic to permanently unify two instructions and make sure
it establishes a context and does a complaining diff.  Also make sure we
unify the prelude and postlude of a diff after a block-diff call.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109744 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 09:20:34 +00:00
John McCall
e2921432b6 Diagnose non-structural differences in the case where blocks were
structurally identical.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109743 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 09:04:45 +00:00
John McCall
02e116cb06 When unifying instructions during a block diff, actually complain about
any differences we see.  This should only happen if there are "non-structural"
differences between the instructions, i.e. differences which wouldn't cause
diff to return true.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109742 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 08:59:27 +00:00
John McCall
dfb44ac690 Somehow I was getting reasonable results for the test cases I was interested
in despite not ever incrementing any path costs, so that the only nonzero costs
arose from the all-left path in the first column.  Anyway.  Perform the diff
starting from the beginning of the block to avoid capturing (say) loads of
allocas.

Vastly improves diff results on code that hasn't been mem2reg'ed.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109741 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 08:53:59 +00:00
John McCall
62dc1f3d82 Cache the result of errs() and implement formatted logging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109740 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 08:14:41 +00:00
John McCall
3dd706b528 Add the llvm-diff tool, which performs a relatively naive structural
diff of a function.  There's a lot of cruft in the current version, and
it's pretty far from perfect, but it's usable.

Currently only capable of comparing functions.  Currently ignores metadata.
Currently ignores most attributes of functions and instructions.

Patches welcome.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109739 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 07:53:27 +00:00
Jakob Stoklund Olesen
887b703d22 Use the right gcc tool args for IsARMArchitecture.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109714 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 00:52:16 +00:00
Gabor Greif
7d3056b160 simplify by using CallSite constructors; virtually eliminates CallSite::get from the tree
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109687 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-28 22:50:26 +00:00
Rafael Espindola
bae1b71cbb Instead of abusing swapProgramIn, just add a Module argument to
EmitProgressBitcode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109602 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-28 18:12:30 +00:00
Rafael Espindola
84ae206c97 Clone and restore the module being reduced in
ReduceMiscompilingFunctions::TestFuncs. This makes the test functional
(i.e., no side effects).

Before we would end up using dead functions if a pass decided to remove them
(inline for example) and we would also keep broken functions and conclude that
that a single function was enough to reproduce the bug.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109387 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-26 00:07:51 +00:00
Rafael Espindola
b30cdd830b Revert unintended white space change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109364 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24 23:05:45 +00:00
Rafael Espindola
97595eb05c Fix a trivial use after free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109363 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-24 23:02:11 +00:00
Mikhail Glushenkov
b374d4fd82 Get rid of exceptions in llvmc.
llvmc can be now compiled with llvm-gcc on Windows.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109215 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-23 03:42:55 +00:00
Chris Lattner
c510a7097b there is now no reason to link in TARGETS_TO_BUILD since we list
arm explicitly.  X86 and ARM are the only two targets that support
disassembly, so our explicit list is enough.  These other targets
weren't getting pulled in anyway though, since there were no 
references to their symbols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108934 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 21:26:27 +00:00
Chris Lattner
6f2cea0186 fix edis to only try to link in the x86 parts if the x86 backend is
enabled.  Add direct ARM support.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108933 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 21:23:57 +00:00
Douglas Gregor
aad9c4cf67 Fix edis makefile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108931 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 21:21:27 +00:00
Chris Lattner
e744ab26fd fix DISABLE_EDIS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108925 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 20:55:57 +00:00
Chris Lattner
56ff3f15e7 this logic is handled by tools/makefile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108919 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 20:33:59 +00:00
Chris Lattner
ce61aed551 edis needs to link in mcdisassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108876 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:35:23 +00:00
Chris Lattner
9ae2e3384e update cmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108875 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:33:29 +00:00
Chris Lattner
feb9cf4581 edinfo doesn't need to be built here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108873 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:31:54 +00:00
Chris Lattner
847da55716 start straightening out libedis's dependencies and make it fit
better in the llvm world.  Among other things, this changes:

1. The guts of libedis are now moved into lib/MC/MCDisassembler
2. llvm-mc now depends on lib/MC/MCDisassembler, not tools/edis,
   so edis and mc don't have to be built in series.
3. lib/MC/MCDisassembler no longer depends on the C api, the C
   API depends on it.
4. Various code cleanup changes. 

There is still a lot to be done to make edis fit with the llvm
design, but this is an incremental step in the right direction.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108869 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 18:25:19 +00:00
Owen Anderson
8be3291f59 Speculatively revert r108813, in an attempt to get the self-host buildbots working again. I don't see why this patch
would cause them to fail the way they are, but none of the other intervening patches seem likely either.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108818 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 08:26:15 +00:00
Owen Anderson
9e081004da Reapply r108794, a fix for the failing test from last time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108813 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 06:52:42 +00:00
Daniel Dunbar
e8a469cdb4 Revert r108794, "Separate PassInfo into two classes: a constructor-free
superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).", it is
breaking teh everything.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108805 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 03:06:07 +00:00
Owen Anderson
8ba15cb709 Separate PassInfo into two classes: a constructor-free superclass (StaticPassInfo) and a constructor-ful subclass (PassInfo).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108794 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 01:19:58 +00:00
Mikhail Glushenkov
fc97aeb4e6 llvmc: Add a new option type (switch_list).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108673 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 03:16:25 +00:00
Daniel Dunbar
d73ada7d24 Target: Give the TargetAsmParser access to the TargetMachine.
- Unfortunate, but necessary for now to handle subtarget instruction matching. Eventually we should factor out the lower level target machine information so we don't need to do this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108664 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 00:33:49 +00:00
Daniel Dunbar
0261243f6e edis: Save the TargetMachine in the EDDisassembler object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108663 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-19 00:33:43 +00:00
Daniel Dunbar
9fbb37e10d MC: Move several clients to using AsmParser constructor function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108645 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:31:33 +00:00
Daniel Dunbar
346cc61cd2 llvm-mc: Fix llvm-mc -as-lex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108644 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-18 18:31:28 +00:00