Commit Graph

2495 Commits

Author SHA1 Message Date
Mikhail Glushenkov
223e99cd8d Temporary copy-pasto to make examples compile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74001 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 20:47:24 +00:00
Mikhail Glushenkov
d80d8690af Make llvmc work again.
Chris recently broke llvmc with his Makefile changes (r75379). That patch made
the global change .o -> .a, which caused built-in llvmc plugins to stop working
since plugin initialization in llvmc is based on static variables not referenced
from the main executable. This patch implements auto-generated forced references
to the plugin libraries.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74000 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 20:46:48 +00:00
Chris Lattner
29dfe7c5f7 refactor a bunch of X86 specific stuff out to its own file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73982 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 18:41:30 +00:00
Douglas Gregor
8756a8db5b CMake: remove support for llvm-config-generated dependencies in the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73979 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 18:30:17 +00:00
Chris Lattner
8dfbe6c853 implement a trivial binary expression parser, we can now parse all of 176.gcc.llc.s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73950 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 05:57:07 +00:00
Chris Lattner
bcd0b8d2ef get a definition of strull on windows, thanks to Howard Su.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73929 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-23 00:24:36 +00:00
Bob Wilson
75d6ffd53f Recognize and handle ARM v7 target triples for Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73889 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 18:01:28 +00:00
Duncan Sands
66b9f29df2 Include cstdio to get EOF, needed with gcc-4.4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73879 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 06:59:32 +00:00
Chris Lattner
7031806fe2 process memory operands with a parenthesized expression for a displacement,
like "(4+5)(%eax)".



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73878 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 06:35:58 +00:00
Chris Lattner
74ec1a3b11 Implement full support for parsing primary expressions. We can now parse
all of health and voronoi (ignoring directives).  We only get 409 lines into
176.gcc though because we don't have binary operators yet:

Parsing 176.gcc.llc.s:409: unexpected token in operand list
	movsbl	_arityvec+1(,%edi,8), %eax
	      	         ^



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73877 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 06:32:03 +00:00
Chris Lattner
be9c23fef4 implement parser support for '*' operands, as in "call *%eax".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73876 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 06:02:13 +00:00
Chris Lattner
c41938303b implement memory operand parsing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73875 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 05:51:26 +00:00
Chris Lattner
2cf5f14f20 start implementing some simple operand parsing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73867 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22 01:29:09 +00:00
Chris Lattner
14ee48a5ba rename SourceMgr::PrintError to PrintMessage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73861 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 21:22:11 +00:00
Chris Lattner
b0789ed5a4 set up the top-level parsing loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73860 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 20:54:55 +00:00
Chris Lattner
27aa7d259b stub out parser for asm files. Change invariant on lexer to always
print its error message when it returns an asmtok::Error token.
Compute a proper error code for llvm-mc in 'lex' mode.  Add new
-as-lex option to enable lexing mode (vs parsing mode).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73859 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 20:16:42 +00:00
Chris Lattner
10a907d70f add string literals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73858 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 19:56:35 +00:00
Chris Lattner
4506bd2cfd hopefully fix the build on linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73857 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 19:43:50 +00:00
Chris Lattner
4651bca31b implement enough of a lexer to get through Olden/health/Output/health.llc.s
without errors.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73855 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 19:21:25 +00:00
Chris Lattner
4577bbaa12 oh yeah, cmake needs to be told explicitly about new files :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73849 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 07:19:34 +00:00
Chris Lattner
a59e877996 some baby steps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73848 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 07:19:10 +00:00
Chris Lattner
b23677e076 start wiring up support for asm parsing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73846 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-21 05:22:37 +00:00
Chris Lattner
f4a481505e fix build problem pointed out by John Thompson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73739 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 23:46:04 +00:00
Chris Lattner
bb4688a9cf fix file header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73733 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 23:05:21 +00:00
Chris Lattner
f9f065e455 Add a skeleton driver for new machine code level fun. llvm-mc is meant
to be a test driver of other components in the system, which will develop
over time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73732 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-18 23:04:45 +00:00
Chris Lattner
2deb58f72e switch to using llvm/Target/TargetSelect.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73611 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-17 16:42:19 +00:00
Nick Lewycky
8189d40a8d Fix libLTO by #include'ing the initializers for all targets and all asm
printers.

While I'm here, alphabetize.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73606 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-17 06:52:10 +00:00
Mikhail Glushenkov
4aecec1f50 Another small documentation update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73596 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-17 02:56:08 +00:00
Chris Lattner
c447ff693e Use Doug's new LLVM_NATIVE_ARCH macro in config.h to link in the native
target so that the JIT works in LLI, not just the interpreter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73595 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-17 02:15:40 +00:00
Chris Lattner
6be926647d Remove support for building LLVM libraries into "relinked"
object files.  Now we always build LLVM libraries into archives (.a files).

This makes the 'make' build work more like the cmake build, among other
things.  Doing this exposed some latent circular library dependencies, so
I think that llvm-config wasn't quite right for .o files anyway.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73579 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-16 23:00:42 +00:00
Douglas Gregor
1555a23335 Introduce new headers whose inclusion forces linking and
initialization of all targets (InitializeAllTargets.h) or assembler
printers (InitializeAllAsmPrinters.h). This is a step toward the
elimination of relinked object files, so that we can build normal
archives.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73543 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-16 20:12:29 +00:00
Mikhail Glushenkov
530f399743 Documentation update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73448 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-16 00:13:52 +00:00
Rafael Espindola
42de34f013 Remove the gcc= option. llvm-gcc uses only as=
Look for as in the path. Doing it here instead
of llvm-gcc because llvm-gcc has nothing as
convenient as sys::Program::FindProgramByName.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73383 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-15 10:14:18 +00:00
Rafael Espindola
f403cd7838 Bug fix:
string::find returns string::npos if the substring is not found.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73145 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-09 21:14:25 +00:00
Mikhail Glushenkov
9dcc26b6a0 A basic PIC16 toolchain driver.
Nice addition to the examples and also a starting point for Sanjiv to work on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73013 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-07 07:08:01 +00:00
Nick Lewycky
a9b9032df1 Add option for specifying the path to assembler, "as". This overrides the path
to gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73008 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-07 00:50:45 +00:00
Devang Patel
578efa920a Add new function attribute - noimplicitfloat
Update code generator to use this attribute and remove NoImplicitFloat target option.
Update llc to set this attribute when -no-implicit-float command line option is used.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72959 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-05 21:57:13 +00:00
Devang Patel
d18e31ae17 Add new function attribute - noredzone.
Update code generator to use this attribute and remove DisableRedZone target option.
Update llc to set this attribute when -disable-red-zone command line option is used.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72894 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04 22:05:33 +00:00
Douglas Gregor
8eeb96d2d5 CMake: Use explicit dependencies for Xcode (as well as MSVC), to make
the CMake-generated Xcode project build properly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72883 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04 19:53:37 +00:00
Nick Kledzik
d8b4711a16 <rdar://problem/6944342> libLTO for darwin should add -static when assembling .s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72881 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04 19:14:08 +00:00
Nick Kledzik
cbad586240 <rdar://problem/6940611> libLTO.dylib needs to let linker specify path to assembler
Add lto_codegen_set_assembler_path() API which allows the linker to specify the
path to the assembler tool to run.  When assembler is used (instead of compiler)
different command line options are used.
Add LTO_API_VERSION #define so clients (linkers) can conditionalize use of new APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72823 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04 00:28:45 +00:00
Nick Kledzik
f5a1c35f1b <rdar://problem/6941517> C++ static constructors not preserved for static executable using LTO
Move setRelocationModel() to be called before TargetMachine is instantiated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72816 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 22:52:12 +00:00
Daniel Dunbar
e0f0e0be1c Change LTO to run the global opt pass twice.
- This matches llvm-ld.

It took a bit of archeology to figure out what the right thing to do was
(whether this was intentionally added or intentionally removed). My final
conclusion is that Chris added this intentionally here:
  http://llvm.org/viewvc/llvm-project?view=rev&revision=16913
but the changes weren't propogated to llvm-ld until here:
  http://llvm.org/viewvc/llvm-project?view=rev&revision=34058
which was after lto.cpp had been cloned off (of llvm-ld), here:
  http://llvm.org/viewvc/llvm-project?view=rev&revision=29494

From the commit message, it looks like the motivation for running global opt
again is because we ran it prior to inlining. Based on that I updated the
comment and also only run the pass if we actually ran the inliner.

Chris, please review.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72811 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 21:51:32 +00:00
Daniel Dunbar
006a034828 Add createStandardLTOPasses to StandardPasses.h, and move lto and llvm-ld over.
- I know it sounds crazy, but I think all the pass lists are now coalesced into
   StandardPasses.h.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72805 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 21:06:14 +00:00
Daniel Dunbar
ca8131ebac Switch opt to using StandardPasses.h
- No functionality change, but please check if you don't believe me.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72789 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 18:22:15 +00:00
Oscar Fuentes
81a875585c CMake: Implements and documents option LLVM_ENABLE_ASSERTS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72774 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03 15:11:25 +00:00
Nick Kledzik
4bdf73025a update comments about .objc_ symbols being generated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72708 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01 23:41:09 +00:00
Nick Kledzik
3eb445feb2 <rdar://problem/6927148> libLTO needs to handle i386 magic objc class symbols
Parse __OBJC data structures and synthesize magic .objc_ symbols.
Also, alter mangler so that objc method names are readable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72700 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01 20:33:09 +00:00
Nick Lewycky
079c034489 Add missing codenames to the .bc analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72684 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-01 04:41:03 +00:00
Evan Cheng
63d6f324ca Untabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72600 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-30 00:48:34 +00:00