Commit Graph

642 Commits

Author SHA1 Message Date
Jeffrey Yasskin
6865f29fe7 Fix PR6951 by fixing Module leaks in bugpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103523 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11 23:25:16 +00:00
Kalle Raiskila
faa95763eb Add command line option --gcc to bugpoint.
Remove sending duplicate of the --gcc-tool-args parameters to gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103397 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 07:38:37 +00:00
Nick Lewycky
8d0e1bcc92 The llc -f flag was removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102670 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-29 23:37:44 +00:00
Nick Lewycky
ac1a379499 Don't forget cmake!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101234 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 05:35:20 +00:00
Nick Lewycky
d4ef4df939 Remove accidentally committed cruft.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101230 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 04:46:11 +00:00
Nick Lewycky
ac15da6705 Bugpoint no longer uses exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101228 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 04:40:31 +00:00
Benjamin Kramer
2706387d37 Boolify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101035 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 12:22:19 +00:00
Nick Lewycky
22ff748712 Remove use of exceptions from bugpoint. No deliberate functionality change!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101013 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-12 05:08:25 +00:00
Nick Lewycky
16350f8d00 Remove dead argument and clean whitespace. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100954 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10 23:18:13 +00:00
Dan Gohman
51ecc389a9 Trim #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99416 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 19:56:17 +00:00
Jeffrey Yasskin
c1dc067970 Free all Constants in ~LLVMConstantImpl. We avoid assertion failures
by dropping all references from all constants that can use other
constants before trying to destroy any of them.

I also had to free bugpoint's Module in ~BugDriver().



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99160 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-22 05:23:37 +00:00
Jeffrey Yasskin
c3e6859d8d Bugpoint's default memory limit (100MB) was too low for valgrind, so
this patch raises the default to 800MB when valgrind's active.  800
was chosen semi-arbitrarily.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98905 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-19 00:09:28 +00:00
Chris Lattner
50010429a7 add support for bugpointing the integrated assembler. Something like this
works for me: bugpoint Output/bisort.llvm.bc -run-llc-ia -safe-run-llc

This uses llc with the integrated assembler as the test compiler and llc
without it as the safe compiler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98618 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 06:41:47 +00:00
Duncan Sands
1df9859c40 There are two ways of checking for a given type, for example isa<PointerType>(T)
and T->isPointerTy().  Convert most instances of the first form to the second form.
Requested by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96344 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16 11:11:14 +00:00
Benjamin Kramer
12ea66a727 Replace strcpy with memcpy when we have the length around anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94746 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 18:04:38 +00:00
Chris Lattner
1ffb33d033 remove obsolete comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93661 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 21:34:51 +00:00
Chris Lattner
8abfb8adb2 bugpoint doesn't need the mangler at all. DisambiguateGlobalSymbols
dates to a time when two different LLVM values could have the same
name but different types.  Simplify it to just assign names to unnamed
things and let the core symtab resolve duplicates.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93660 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 21:34:01 +00:00
Chris Lattner
469340493c switch liblto to use the new getNameWithPrefix() method instead of getMangledName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93643 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-16 18:12:14 +00:00
Duncan Sands
3ea11cf8fc Make bugpoint pass -load arguments to LLI. This lets one use bugpoint with
programs that depend on native shared libraries.  Patch by Timo Lindfors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89087 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-17 10:20:22 +00:00
Benjamin Kramer
05872ea804 Add compare_lower and equals_lower methods to StringRef. Switch all users of
StringsEqualNoCase (from StringExtras.h) to it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87020 91177308-0d34-0410-b5e6-96231b3b80d8
2009-11-12 20:36:59 +00:00
Duncan Sands
ac53a0b272 Introduce and use convenience methods for getting pointer types
where the element is of a basic builtin type.  For example, to get
an i8* use getInt8PtrTy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83379 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-06 15:40:36 +00:00
Nick Lewycky
c332fba828 Remove the default value for ConstantStruct::get's isPacked parameter and
update the code which was broken by this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82327 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-19 20:30:26 +00:00
Daniel Dunbar
68ccdaa849 Add -output-prefix option to bugpoint (to change the default output name).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81154 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-07 19:26:11 +00:00
Dan Gohman
dad45ea56e Make bugpoint use ParseIRFile instead of doing the same thing manually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80927 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-03 16:32:58 +00:00
Chris Lattner
306110845a only print the override triple if it exists!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80534 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-31 03:22:35 +00:00
Dan Gohman
baa26395cc Make LLVM command-line tools overwrite their output files without -f.
This is conventional command-line tool behavior. -f now just means
"enable binary output on terminals".

Add a -f option to llvm-extract and llvm-link, for consistency.

Remove F_Force from raw_fd_ostream and enable overwriting and
truncating by default. Introduce an F_Excl flag to permit users to
enable a failure when the file already exists. This flag is
currently unused.

Update Makefiles and documentation accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79990 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-25 15:34:52 +00:00
Chris Lattner
23132b188b prune the #includes in raw_ostream.h by moving a
member out of line. ftostr is not particularly speedy,
so that method is presumably not perf sensitive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79885 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-24 03:52:50 +00:00
Chris Lattner
74382b7c69 Prune #includes from llvm/Linker.h and llvm/System/Path.h,
forcing them down into various .cpp files.

This change also:
1. Renames TimeValue::toString() and Path::toString() to ::str()
   for similarity with the STL.
2. Removes all stream insertion support for sys::Path, forcing
   clients to call .str().
3. Removes a use of Config/alloca.h from bugpoint, using smallvector
   instead.
4. Weans llvm-db off <iostream>

sys::Path really needs to be gutted, but I don't have the desire to
do it at this point.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79869 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 22:45:37 +00:00
Chris Lattner
b683ea4712 eliminate the ostream version of CheckBitcodeOutputToConsole,
change the raw_ostream one to take the raw_ostream byref instead
of byptr.  Prune #includes, eliminate a use of Streams.h


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79863 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 21:36:09 +00:00
Chris Lattner
b515d75856 eliminate the std::ostream forms of the bitcode writing APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79840 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 07:49:08 +00:00
Chris Lattner
17e9edc4a7 Change raw_fd_ostream to take flags as an optional bitmask
instead of as two bools.  Use this to add a F_Append flag
which has the obvious behavior.

Other unrelated changes conflated into this patch:

1. REmove EH stuff from llvm-dis and llvm-as, the try blocks
   are dead.
2. Simplify the filename inference code in llvm-as/llvm-dis,
   because raw_fd_ostream does the right thing with '-'.
3. Switch machine verifier to use raw_ostream instead of ostream
   (Which is the thing that needed append in the first place).




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79807 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 02:51:22 +00:00
Benjamin Kramer
ad0f120f59 Proper MSVC build fix (and remove my hack again). Patch by Yonggang Luo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79418 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 12:38:51 +00:00
Benjamin Kramer
e057e59061 Add a hack to unbreak MSVC builds. str(n)casecmp are POSIX functions and aren't available on windows (mingw defines them though).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79417 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 12:16:17 +00:00
Nick Lewycky
40cce094a3 Include valgrind in the steps to reproduce if valgrind was used to reproduce
the problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79322 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 06:08:01 +00:00
Daniel Dunbar
ca74096642 Change bugpoint to use Triple to make runtime decisions.
- This is cleaner, and makes bugpoint match the host instead of the build
   architecture.

 - Patch by Sandeep Patel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79309 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 03:35:57 +00:00
Owen Anderson
1d0be15f89 Push LLVMContexts through the IntegerType APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 21:58:54 +00:00
Benjamin Kramer
12ddd40953 Make LLVMContext and LLVMContextImpl classes instead of structs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78690 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-11 17:45:13 +00:00
Daniel Dunbar
482cccd37e MSVC warning fixes; patch by Stein Roger!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78405 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-07 20:50:09 +00:00
Owen Anderson
d7f2a6cb3f Privatize the StructType table, which unfortunately involves routing contexts through a number of APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78258 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05 23:16:16 +00:00
Dan Gohman
8608cf23da Use (void *)(intptr_t) to cast function addresses to void*
for use with sys::Path::GetMainExecutable, to avoid warnings
with -pedantic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78245 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05 21:03:39 +00:00
Dan Gohman
197f728d49 Fix FindExecutable to use sys::Path::GetMainExecutable instead of
just argv[0]. And remove the code for searching the current
working directory and for searching PATH; the point of FindExecutable
is not to find whatever version of the executable can be found by
searching around, but to find an executable that accompanies the
current executable.

Update the tools to use sys::Program::FindProgramByName when they
want PATH searching.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78240 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05 20:21:17 +00:00
Anton Korobeynikov
26964b6dc1 Pass user only if it's non-empty. Patch by Sandeep.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78184 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05 09:32:53 +00:00
Anton Korobeynikov
86c006a971 Add save-temps option to bugpoint to keep temporary stuff.
Patch by Sandeep Patel

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78183 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-05 09:32:10 +00:00
Owen Anderson
48b2f3e485 Factor some of the constants+context related code out into a separate header, to make LLVMContextImpl.h
not hideous.  Also, fix some MSVC compile errors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78115 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-04 22:41:48 +00:00
Owen Anderson
a7235ea724 Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77721 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 20:28:14 +00:00
Owen Anderson
9e9a0d5fc2 Move more code back to 2.5 APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77635 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-30 23:03:37 +00:00
Owen Anderson
debcb01b0f Move types back to the 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 22:17:13 +00:00
Owen Anderson
baf3c40440 Move ConstantExpr to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77494 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 18:55:55 +00:00
David Goodwin
265d82e4c6 Add a bugpoint flag to disable block extraction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77389 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 23:08:36 +00:00
Owen Anderson
1fd7096407 Change ConstantArray to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77347 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 18:32:17 +00:00
Dan Gohman
b6dec1bdd6 Pass true to the Internalize parameter of createStandardLTOPasses,
to match llvm-ld's default behavior.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77273 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 23:23:47 +00:00
Owen Anderson
8fa3338ed2 Move ConstantStruct back to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77266 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 22:29:26 +00:00
Daniel Dunbar
3f53fa9a51 Remove Value::setName(const char*, unsigned).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77100 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-26 00:34:27 +00:00
Owen Anderson
eed707b1e6 Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77011 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 23:12:02 +00:00
Daniel Dunbar
f6ccee5a9d Switch to getNameStr().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76962 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-24 08:24:36 +00:00
Owen Anderson
e922c02019 Get rid of the Pass+Context magic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 00:24:57 +00:00
Evan Cheng
49419e28fe 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76629 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-21 19:25:09 +00:00
David Goodwin
91cf361516 For remote execution, must cd to the executable directory since the exe expects to find a dylib in the CWD ('.').
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76432 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 17:15:03 +00:00
Daniel Dunbar
1488670076 Add -std-{compile,link}-opts to bugpoint.
- Sheesh.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76402 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 07:01:01 +00:00
Chris Lattner
e0d5c17921 fix test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76378 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 20:19:25 +00:00
Chris Lattner
4285d15703 DisambiguateGlobalSymbols should not mangle intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76377 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 20:19:04 +00:00
Viktor Kutuzov
fc2271f3f5 Require a remote command to exit with the exit status of the test program or with 255 if an error occurred.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76323 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 18:39:24 +00:00
Dan Gohman
ac95cc79ac Convert more tools code from cerr and cout to errs() and outs().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76070 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 15:30:09 +00:00
Owen Anderson
0d7c695c74 To simplify the upcoming context-on-type change, switch all command line tools to using the default global context for now.
This will let us to hardwire stuff to the global context in the short term while the API is sorted out.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75846 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 22:16:10 +00:00
Dan Gohman
a1bdcedc38 Add a Force option to raw_fd_ostream to specify whether opening
an existing file is considered an error. Convert several tools
to use raw_fd_ostream instead of std::ostream, and to use this
new option instead of doing a manual check.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75801 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 17:29:42 +00:00
Dan Gohman
65f57c233c Use errs() instead of std::cerr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75791 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 16:35:29 +00:00
Chris Lattner
9d5511b7db eliminate the Mangler::PreserveAsmNames bit, the sole client of this
can do it perfectly well itself.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75743 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-15 04:50:47 +00:00
Evan Cheng
f975e011fb control reaches end of non-void function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75714 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 23:55:32 +00:00
Owen Anderson
9adc0abad3 Move EVER MORE stuff over to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75703 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 23:09:55 +00:00
Viktor Kutuzov
699220b64f Fix for bugpoint -remote-client
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75665 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 19:10:55 +00:00
Chris Lattner
b8158acc23 Reapply my previous asmprinter changes now with more testing and two
additional bug fixes:

1. The bug that everyone hit was a problem in the asmprinter where it
   would remove $stub but keep the L prefix on a name when emitting the
   indirect symbol.  This is easy to fix by keeping the name of the stub
   and the name of the symbol in a StringMap instead of just keeping a
   StringSet and trying to reconstruct it late.

2. There was a problem printing the personality function.  The current
   logic to print out the personality function from the DWARF information
   is a bit of a cesspool right now that duplicates a bunch of other 
   logic in the asm printer.  The short version of it is that it depends
   on emitting both the L and _ prefix for symbols (at least on darwin)
   and until I can untangle it, it is best to switch the mangler back to
   emitting both prefixes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75646 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 18:17:16 +00:00
Daniel Dunbar
1f316e321a Revert r7561{9,8,7,6}, which depend on r75610.
--- Reverse-merging r75619 into '.':
U    lib/Target/DarwinTargetAsmInfo.cpp
U    lib/CodeGen/AsmPrinter/AsmPrinter.cpp
--- Reverse-merging r75618 into '.':
U    lib/CodeGen/ELFWriter.cpp
U    lib/CodeGen/MachOCodeEmitter.cpp
U    lib/CodeGen/MachOWriter.cpp
--- Reverse-merging r75617 into '.':
U    lib/Target/CBackend/CBackend.cpp
--- Reverse-merging r75616 into '.':
U    tools/bugpoint/Miscompilation.cpp
U    tools/lto/LTOCodeGenerator.cpp
U    tools/lto/LTOModule.cpp


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75638 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 16:25:11 +00:00
Chris Lattner
b5851462d0 rename getValueName -> getMangledName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75616 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 06:19:07 +00:00
Dan Gohman
e860dcb6e4 #include "llvm/Assembly/Writer.h" to get the declaration for WriteAsOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75542 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:56:37 +00:00
Owen Anderson
db1cd5eba5 Fix the build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75536 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 22:40:32 +00:00
Owen Anderson
0a5372ed3e Begin the painful process of tearing apart the rat'ss nest that is Constants.cpp and ConstantFold.cpp.
This involves temporarily hard wiring some parts to use the global context.  This isn't ideal, but it's
the only way I could figure out to make this process vaguely incremental.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 04:09:18 +00:00
Daniel Dunbar
84f9abe3f5 Fix unused function warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75386 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-11 21:24:52 +00:00
David Goodwin
80becf194d Support remote execute for ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75292 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-10 21:39:28 +00:00
Owen Anderson
333c400965 This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75200 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 23:48:35 +00:00
Owen Anderson
e9b11b4313 Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75025 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 19:03:57 +00:00
Owen Anderson
3d29df3e8a Push LLVMContext through GlobalVariables and IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74985 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 01:26:06 +00:00
Chris Lattner
92bcb426c3 switch the .ll parser into SMDiagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74734 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-02 22:46:18 +00:00
Owen Anderson
4434ed44c4 Make the use of const with respect to LLVMContext sane. Hopefully this is the last time, for the
moment, that I will need to make far-reaching changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74655 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 23:13:44 +00:00
Owen Anderson
31895e7359 Hold the LLVMContext by reference rather than by pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 21:22:36 +00:00
Owen Anderson
8b477ed579 Add a pointer to the owning LLVMContext to Module. This requires threading LLVMContext through a lot
of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools.

Patches for Clang and LLVM-GCC to follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 16:58:40 +00:00
Nick Lewycky
028839db09 Fix the crash debugger to actually bisect globals once it's determined that it
can't just eliminate all global initializers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72378 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-25 06:29:56 +00:00
Nick Lewycky
4c8f9af6e0 Add a bisection step on the list of instructions before doing the linear
simplification. It's not clear to me whether this can replace the first of the
linear instruction simplification stages or not, so I left it in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72377 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-25 05:30:00 +00:00
Torok Edwin
2c23501031 Make bugpoint emit a bugpoint-reduced-blocks.bc, because bugpoint itself
can crash during instruction simplification (for example if it creates a
broken module).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72362 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-24 09:40:47 +00:00
Torok Edwin
23d471f62e Add -disable-global-remove option to bugpoint.
Sometimes when bugpointing a crash the bugpoint-reduced-simplified.bc reproduces
a totally different bug than the original one ("GV doesn't have initializer").
Although its useful to report that bug too, I need a way to reduce the original
bug, hence I introduced -disable-global-remove.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72361 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-24 09:31:04 +00:00
Evan Cheng
26edc21b1b bugpoint for jit should just ignore GCC arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70988 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-05 18:35:36 +00:00
Dan Gohman
0324205bbb Improve bugpoint's error messages when it runs out of memory,
or when some other std::exception is thrown.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70175 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-27 01:30:37 +00:00
Dan Gohman
d50330cd02 Use CloneModule's ValueMap in more places, instead of looking
up functions by name.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69805 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-22 15:57:18 +00:00
Nick Lewycky
e032590f58 CloneModule stores the BasicBlock mapping in ValueMap. There's no need to
recompute it. This fixes a O(n^2) in number of blocks when reducing a crash.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68422 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-04 09:39:23 +00:00
Evan Cheng
fd82995823 Also pass -gcc-tool-args when building a shared object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66746 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-12 00:53:34 +00:00
Chris Lattner
cc14d25dd9 Change various llvm utilities to use PrettyStackTraceProgram in
their main routines.  This makes the tools print their argc/argv
commands if they crash.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66248 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 05:34:10 +00:00
Dan Gohman
f6dd0eb5c4 Use CloneModule's ValueMap to avoid needing to look up
functions by name. This fixes PR718.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66239 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-06 02:16:23 +00:00
Dan Gohman
ef0ff140a7 Fix a bugpoint bug on anonymous functions. Instead of looking up
functions in the new module by name, use the ValueMap provided by
CloneModule to do the lookups.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66216 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-05 23:20:46 +00:00
Bill Wendling
38efa38c86 Add a "-gcc-tool-args" option. This option acts like the "-tool-args" option,
but passes the arguments to the "gcc" invocation instead of to the "llc"
invocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65896 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-02 23:13:18 +00:00
Dan Gohman
865f006bb4 Eliminate several more unnecessary intptr_t casts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64888 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-18 05:09:16 +00:00
Dan Gohman
a971b29425 Rename bugpoint's error message file so that if it somehow
gets left behind, it's less cryptic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64399 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-12 20:53:27 +00:00
Chris Lattner
3a4baf1951 fix bugpoint url, patch by Pieter de Bie!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64022 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-07 18:56:30 +00:00
Rafael Espindola
bb46f52027 Add the private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-15 20:18:42 +00:00
Chris Lattner
df98617b23 Reimplement the old and horrible bison parser for .ll files with a nice
and clean recursive descent parser.

This change has a couple of ramifications:
1. The parser code is about 400 lines shorter (in what we maintain, not
   including what is autogenerated).
2. The code should be significantly faster than the old code because we 
   don't have to work around bison's poor handling of datatypes with 
   ctors/dtors.  This also makes the code much more resistant to memory 
   leaks.
3. We now get caret diagnostics from the .ll parser, woo.
4. The actual diagnostics emited from the parser are completely different
   so a bunch of testcases had to be updated.
5. I now disallow "%ty = type opaque %ty = type i32".  There was no good
   reason to support this, it was just an accident of the old 
   implementation.  I have no reason to think that anyone is actually using
   this.
6. The syntax for sticking a global variable has changed to make it 
   unambiguous.  I don't think anyone is depending on this since only clang
   supports this and it is not solid yet, so I'm not worried about anything
   breaking.
7. This gets rid of the last use of bison, and along with it the .cvs files.
   I'll prune this from the makefiles as a subsequent commit.

There are a few minor cleanups that can be done after this commit (suggestions
welcome!) but this passes dejagnu testing and is ready for its time in the
limelight.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61558 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-02 07:01:27 +00:00
Dan Gohman
70ef449741 Generalize bugpoint's concept of a "safe" backend, and add options
to allow the "safe" backend to be run with a different path, and/or
with different command-line options.

This enables the following use cases:
 - bugpoint llc against an llc command from a different build
 - bugpoint llc against the same llc with different command-line options
 - and more...

Also, document the existing "custom" interpreter options.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60681 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-08 04:02:47 +00:00
Nick Lewycky
33b1c30b0b Remove -check-exit-code from bugpoint. This is subsumed by -append-exit-code.
Note that -check-exit-code was on by default while -append-exit-code is not.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58221 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-26 23:59:36 +00:00
Oscar Fuentes
3d01fc7de8 Initial support for the CMake build system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56419 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 01:08:49 +00:00
Evan Cheng
70f684fcf9 Allow use of ssh to perform remote execution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55979 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-09 06:11:26 +00:00
Matthijs Kooijman
bcbd9c43a1 Improve bugpoint output a bit by outputting the actual instructions instead of
just it's name, which is often empty. Also remove a newline from the output
that wasn't really needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54158 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-29 08:55:30 +00:00
Dan Gohman
cebf59b4a9 Reformat this message to fit in 80 cols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53561 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-14 17:43:27 +00:00
Owen Anderson
7220b814ed Global variables beginning with \01 have special meaning on Darwin, so we need to remove
the name prefix when we change them from internal to external.  This allows bugpointing
of codegen miscompilations to work more reliably on Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53236 91177308-0d34-0410-b5e6-96231b3b80d8
2008-07-08 16:38:42 +00:00
Matthijs Kooijman
ad6996d74f Let bugpoint display generated messages on stderr only if no interpreter was
found, this ensures that messages like "Found gcc" end up on stdout where they
belong.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52235 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-12 13:09:43 +00:00
Matthijs Kooijman
fbea227f41 Add -silence-passes option to bugpoint. This option suppresses output generated
when bugpoint is running passes in a child process.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52234 91177308-0d34-0410-b5e6-96231b3b80d8
2008-06-12 13:02:26 +00:00
Gabor Greif
b1dbcd886a Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51143 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-15 10:04:30 +00:00
Anton Korobeynikov
9ef7425a4d Add possibility of using arbitrary to to execute stuff from bugpoint.
Patch by Pekka Jääskeläinen!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50373 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-28 20:53:48 +00:00
Chris Lattner
e78109eb3a several multiple-retval fixes for bugpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50331 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-28 00:04:58 +00:00
Owen Anderson
6bc41e8a74 Revert r49614. As Dan pointed out, some of these aren't correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49657 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-14 17:38:21 +00:00
Owen Anderson
386ea355e7 Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2),
which is significantly more efficient.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49614 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 19:15:17 +00:00
Bill Wendling
58f3bcdbb9 Remove tabs. Patch by Mike Stump!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49317 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 05:47:52 +00:00
Gabor Greif
051a950000 API changes for class Use size reduction, wave 1.
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06 20:25:17 +00:00
Torok Edwin
af4fc28b56 -fPIC is required on x86-64 when building shared objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49274 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06 12:42:29 +00:00
Andrew Lenharth
df4613ced2 With debug info, there are nameless constant global values. do not crash when we hit one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48749 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-24 22:16:14 +00:00
Bill Wendling
584c3bf650 Detabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47596 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-26 10:46:10 +00:00
Dan Gohman
39564499c4 Fix a missing space in the description of the find-bugs option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47271 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-18 17:15:45 +00:00
Nick Lewycky
1d1ef14248 PR2027, Fix bugpoint's -find-bugs option, clean up the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47105 91177308-0d34-0410-b5e6-96231b3b80d8
2008-02-14 05:01:46 +00:00
Chris Lattner
4a6a6f21f3 Fix PR1797
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45736 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-08 04:26:20 +00:00
Chris Lattner
21c62da287 remove attributions from tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45421 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:44:31 +00:00
Chris Lattner
5116784826 remove attributions from tools/utils makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45414 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:07:17 +00:00
Christopher Lamb
43ad6b3e0d Change the PointerType api for creating pointer types. The old functionality of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45082 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17 01:12:55 +00:00
Duncan Sands
a3355ffb3d Rather than having special rules like "intrinsics cannot
throw exceptions", just mark intrinsics with the nounwind
attribute.  Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44544 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-03 20:06:50 +00:00
Nick Lewycky
6fa98b1320 Allow the block extractor take to take a list of basic blocks to not extract
from a file containing Function/BasicBlock pairings. This is not safe against
anonymous or abnormally-named Funcs or BBs.

Make bugpoint use this interface to pass the BBs list to the child bugpoint.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44101 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-14 06:47:06 +00:00
Gordon Henriksen
4e1be6d5ea Deleting redundant copy of block extractor pass. See also PR1775.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43694 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-05 01:54:05 +00:00
Dan Gohman
82a13c9c48 Move the space in overview output for commands out of each of the
commands and into the common code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42752 91177308-0d34-0410-b5e6-96231b3b80d8
2007-10-08 15:45:12 +00:00
David Greene
52eec54820 New CallInst interface to address GLIBCXX_DEBUG errors caused by
indexing an empty std::vector.

Updates to all clients.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40660 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-01 03:43:44 +00:00
Gabor Greif
8ff70c2635 Pretty straightforward replacement of "bytecode" by "bitcode"
performed on tools/ first, in order not to cause lethal damage


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37877 91177308-0d34-0410-b5e6-96231b3b80d8
2007-07-04 21:55:50 +00:00
Lauro Ramos Venancio
497391ad8d Fix bugpoint to run -llc-safe with -Xlinker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37483 91177308-0d34-0410-b5e6-96231b3b80d8
2007-06-06 23:10:56 +00:00
Chris Lattner
065344dfd5 use the new MemoryBuffer interfaces to simplify error reporting in clients.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36900 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 23:45:49 +00:00
Chris Lattner
421e51603a Fix a buggy conversion from bytecode to bitcode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36883 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 19:43:09 +00:00
Chris Lattner
744879ea01 switch tools to bitcode from bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36872 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 09:32:02 +00:00
Chris Lattner
03b6963762 add bitcode support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36849 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 05:47:06 +00:00
Evan Cheng
34e400ebe6 Added -rsh-host and -rsh-user to support remote execution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36685 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-03 18:36:15 +00:00
Devang Patel
1997473cf7 Drop 'const'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-03 01:11:54 +00:00
Devang Patel
3e15bf33e0 Use 'static const char' instead of 'static const int'.
Due to darwin gcc bug, one version of darwin linker coalesces
static const int, which defauts PassID based pass identification.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-02 21:39:20 +00:00
Devang Patel
794fd75c67 Do not use typeinfo to identify pass in pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-01 21:15:47 +00:00
Chris Lattner
00f59da1df remove use of deprecated apis
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34418 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-19 07:41:31 +00:00
Anton Korobeynikov
9ba8a76f8b Add possibility to set memory limit for binaries run via libSystem. This
is especially needed for bugpoint. This partly implements PR688


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34349 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-16 19:11:07 +00:00
Chris Lattner
10ac377f7c eliminate use of vector-related ctors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34226 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 06:05:43 +00:00
Chris Lattner
f2e292ce58 push bytecode decompressor out through APIs. Now the bytecode reader
api's look like this:

ModuleProvider *getBytecodeModuleProvider(
  const std::string &Filename,  ///< Name of file to be read
  BCDecompressor_t *BCDC = Compressor::decompressToNewBuffer,
  std::string* ErrMsg = 0,      ///< Optional error message holder
  BytecodeHandler* H = 0        ///< Optional handler for reader events
);

This is ugly, but allows a client to say:

  getBytecodeModuleProvider("foo", 0);

If they do this, there is no dependency on the compression libraries, saving
codesize.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34012 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-07 21:41:02 +00:00
Reid Spencer
688b0490e2 For PR411:
Adjust to changes in Module interface:
getMainFunction() -> getFunction("main")
getNamedFunction(X) -> getFunction(X)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33922 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 21:19:13 +00:00
Reid Spencer
ef9b9a7939 For PR411:
This patch replaces the SymbolTable class with ValueSymbolTable which does
not support types planes. This means that all symbol names in LLVM must now
be unique. The patch addresses the necessary changes to deal with this and
removes code no longer needed as a result. This completes the bulk of the
changes for this PR. Some cleanup patches will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33918 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-05 20:47:22 +00:00
Reid Spencer
7ba98a9000 For PR1072:
Removing -raise has neglible positive or negative side effects so we are
opting to remove it. See the PR for comparison details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33844 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-03 23:15:56 +00:00