Commit Graph

3347 Commits

Author SHA1 Message Date
NAKAMURA Takumi
ec58f20df3 Don't install libUnitTestMain.a. It might be useless without gtest headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126632 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-28 05:18:07 +00:00
Bill Wendling
7520e3a2b5 A new TableGen feature! (Not turned on just yet.)
InstAlias<{alias}, {aliasee}>;

The InstAlias instruction should be able to go from the MCInst to the
{alias}. All of the information is there to match the MCInst with the
{aliasee}. From there, it's a simple matter to emit the {alias}, with the
correct operands from the {aliasee}.

The code this patch generates can be used by the InstPrinter to automatically
print out the alias without having to write special C++ code to handle the
situation.

This is a WIP, and therefore are several limitations. For instance, it cannot
handle AsmOperands at the moment. It also doesn't know what to do when two
{alias}es match the same {aliasee}. (Currently, it just ignores those two cases
and allows the printInstruction method to handle them.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126538 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-26 03:09:12 +00:00
Bob Wilson
e1b5aa7d86 Removed unnecessary dylibs from Apple builds, with or without "lib" prefix.
Radar 9056686

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126534 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-26 00:22:17 +00:00
Bob Wilson
005c51ddc7 Add a new "Embedded" makefile target for Apple-style builds.
This one just installs the default build into a different destination directory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126533 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25 23:42:03 +00:00
Stuart Hastings
186e2509fd Fix bad comment marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126525 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25 22:47:58 +00:00
David Greene
14a129a3cf Add some options for building LLVM in different environments:
--force-configure to force running configure before building.

--extra-llvm-config-flags
--extra-llvm-gcc-config-flags
--extra-gcc-config-flags

Pass additional argument to the various configure invocations.

This also eliminates a default build flavor because explicitly
specifying builds could result in build flavors being run repeatedly.

Finally, turn off fortran builds for the moment because install
appears to be broken.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126510 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25 20:51:27 +00:00
Stuart Hastings
539f817e34 Omit lto.h from the llvmCore result; henceforth, this will be supplied
by clang.  Radar 9042056.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126507 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-25 20:42:39 +00:00
Argyrios Kyrtzidis
8bef800aaa In utils/TableGen/ClangSACheckersEmitter.cpp, set the 'Hidden' bit for checkers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126436 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-24 21:33:49 +00:00
David Greene
8b890c2f7d Fix Builder::execute() to more properly pass the desired environment
to tools.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126263 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 23:30:45 +00:00
Cameron Zwarich
43dd06ad20 Eliminate valgrind warnings from Python on the 32-bit as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126171 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 01:00:10 +00:00
Rafael Espindola
87ca0e077d Implement xgetbv and xsetbv.
Patch by Jai Menon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126165 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 00:35:18 +00:00
David Greene
8b8b4af404 Add a convenience tool for doing comparison builds of the LLVM
ecosystem.  This is a handy utility for checking changes before
committing them to the repository.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126136 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-21 19:23:22 +00:00
Oscar Fuentes
0b85d07d46 Put targets on folders, if the IDE supports the feature.
Requires CMake 2.8.3 or newer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126092 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 22:06:10 +00:00
Cameron Zwarich
17dce36774 Try to fix the MC/AsmParser/section.s failure on the llvm-x86_64-linux-vg_leak
bot. I am not sure if this is valid Valgrind exclusion file syntax, but the
Internet seems to think so.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126051 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 21:44:35 +00:00
Oscar Fuentes
9a89894537 CMake: updated list of tblgen source files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125969 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:06:23 +00:00
Owen Anderson
d8c87888a7 Add FixedLenDecoderEmitter, the skeleton of a new disassembler emitter for fixed-length instruction encodings.
A major part of its (eventual) goal is to support a much cleaner separation between disassembly callbacks
provided by the target and the disassembler emitter itself, i.e. not requiring hardcoding of knowledge in tblgen
like the existing disassembly emitters do.

The hope is that some day this will allow us to replace the existing non-Thumb ARM disassembler and remove
some of the hacks the old one introduced to tblgen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125966 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 21:51:29 +00:00
Joerg Sonnenberger
6ef6ceda68 Check that MnemonicAlias doesn't map back to the same string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125792 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17 23:22:19 +00:00
NAKAMURA Takumi
214c920818 lit/TestingConfig.py: Add the environment variable PRINTF_EXPONENT_DIGITS as workaround [PR6745] for mingw's tests. Danil Malyshev suggested this.
FIXME: It does not improve MSVC's issue.

[Danil Malyshev] Defining PRINTF_EXPONENT_DIGITS env is the suggested way to make MinGW ANSI/POSIX compatible. This is not only about the case we are discussing, but in general, I'd like to have explicitly defined compatibility mode for all the tests running on MinGW.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125725 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17 05:56:41 +00:00
Sean Hunt
c85094f909 Add serialization for Expr* arguments for attributes to clang tablegen files.
Patch thanks to Zach Anderson.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125721 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17 03:30:09 +00:00
Argyrios Kyrtzidis
ab8f3fd2e1 When tablegen'ing the clang analyzer checkers:
-Use the tablegen class name for the checker class name.
-Mark checker packages as hidden/not hidden.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125558 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 07:42:16 +00:00
Argyrios Kyrtzidis
50a47e93ce Add the ClangSACheckersEmitter tablegen backend which will be used for the clang static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125493 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 17:58:52 +00:00
Bruno Cardoso Lopes
a2b6e4151b Fix encoding and add parsing support for the arm/thumb CPS instruction:
- Add custom operand matching for imod and iflags.
- Rename SplitMnemonicAndCC to SplitMnemonic since it splits more than CC
  from mnemonic.
- While adding ".w" as an operand, don't change "Head" to avoid passing the
  wrong mnemonic to ParseOperand.
- Add asm parser tests.
- Add disassembler tests just to make sure it can catch all cps versions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125489 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 13:09:44 +00:00
Argyrios Kyrtzidis
d91ef79c43 Wrap the struct in an anonymous namespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125452 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-13 07:51:19 +00:00
Jim Grosbach
f922c47143 AsmMatcher custom operand parser failure enhancements.
Teach the AsmMatcher handling to distinguish between an error custom-parsing
an operand and a failure to match. The former should propogate the error
upwards, while the latter should continue attempting to parse with
alternative matchers.

Update the ARM asm parser accordingly.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125426 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-12 01:34:40 +00:00
Jim Grosbach
84cb033bf3 Tidy out asm matcher .inc output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125408 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-11 21:31:55 +00:00
NAKAMURA Takumi
7805cdcab5 lit/TestFormats.py: Unittests may be found with suffix .exe also on Cygwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125273 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-10 09:11:57 +00:00
NAKAMURA Takumi
f5201bcd3b lit/Util.py: On Cygwin, 'PATHEXT' may exist but it should not be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125272 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-10 09:11:48 +00:00
Bill Wendling
b45c7c270c Don't return before calling the post-processing function(s).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125256 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-10 01:28:26 +00:00
Jim Grosbach
b9db0c50d8 Do AsmMatcher operand classification per-opcode.
When matching operands for a candidate opcode match in the auto-generated
AsmMatcher, check each operand against the expected operand match class.
Previously, operands were classified independently of the opcode being
handled, which led to difficulties when operand match classes were
more complicated than simple subclass relationships.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125245 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-10 00:08:28 +00:00
Chris Lattner
1aac1864cf emit a specific error when the input file is empty. This fixes
an annoyance of mine when working on tests: if the input .ll file
is broken, opt outputs an error and generates an empty file.  FileCheck
then emits its "ooh I couldn't find the first CHECK line, scanning
from ..." which obfuscates the actual problem.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125193 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-09 16:46:02 +00:00
NAKAMURA Takumi
302b169323 lit/LitConfig.py: Add the new method getToolsPath(dir,paths,tools).
It seeks tools(eg. [cmp, grep, sed]) in same directory, to be sane.

It seeks "bash" only in the directory found at last time. Or bash would be insane (against other tools).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125175 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-09 04:19:15 +00:00
NAKAMURA Takumi
df944f1f83 lit/Util.py: Add two functions, checkToolsPath(dir,tools) and whichTools(tools,paths).
checkToolsPath(dir,tools):
return True if "dir" contains all "tools".

whichTools(tools,paths):
return a directory that contains all "tools" in "paths".
Or return None when all "tools" were not met.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125174 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-09 04:19:06 +00:00
NAKAMURA Takumi
4203b7116a llvm-lit may be available with CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125168 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-09 04:18:02 +00:00
NAKAMURA Takumi
ce83025ad1 llvm-lit may be able to invoke clang tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125167 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-09 04:17:54 +00:00
Bruno Cardoso Lopes
e7a54520b3 Implement support for custom target specific asm parsing of operands.
Motivation: Improve the parsing of not usual (different from registers or
immediates) operand forms.

This commit implements only the generic support. The ARM specific modifications
will come next.

A table like the one below is autogenerated for every instruction
containing a 'ParserMethod' in its AsmOperandClass

static const OperandMatchEntry OperandMatchTable[20] = {
 /* Mnemonic, Operand List Mask, Operand Class, Features */
 { "cdp", 29 /* 0, 2, 3, 4 */, MCK_Coproc, Feature_IsThumb|Feature_HasV6 },
 { "cdp", 58 /* 1, 3, 4, 5 */, MCK_Coproc, Feature_IsARM },

A matcher function very similar (but lot more naive) to
MatchInstructionImpl scans the table. After the mnemonic match, the
features are checked and if the "to be parsed" operand index is
present in the mask, there's a real match. Then, a switch like the one
below dispatch the parsing to the custom method provided in
'ParseMethod':

 case MCK_Coproc:
   return TryParseCoprocessorOperandName(Operands);




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125030 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 19:38:32 +00:00
Daniel Dunbar
5c228a945f MC/AsmMatcher: Sink ConvertToMCInst into the TargetAsmParser instance, which
implicitly allows custom conversions to be member functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124908 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-04 23:17:40 +00:00
Jason W Kim
685c350ae7 Teach ARM/MC/ELF to handle R_ARM_JUMP24 relocation type for conditional jumps.
(yes, this is different from R_ARM_CALL)

- Adds a new method getARMBranchTargetOpValue() which handles the
  necessary distinction between the conditional and unconditional br/bl
  needed for ARM/ELF

At least for ARM mode, the needed fixup for conditional versus unconditional
br/bl is identical, but the ARM docs and existing ARM tools expect this
reloc type...

Added a few FIXME's for future naming fixups in ARMInstrInfo.td




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124895 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-04 19:47:15 +00:00
Daniel Dunbar
b412915ff6 MC/AsmParser: Add support for allowing the conversion process to fail (via
custom conversion functions).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124872 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-04 17:12:23 +00:00
Daniel Dunbar
cf12067ae0 MC/AsmMatcher: Add support for custom conversion functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124870 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-04 17:12:15 +00:00
David Greene
c83e203757 Silence uninitialized value warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124869 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-04 17:01:53 +00:00
NAKAMURA Takumi
6d600da734 Make Win32's header file name lower for cross build on case-sensitive filesystem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124864 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-04 12:53:04 +00:00
Jim Grosbach
0ed92f2de3 Tidy up a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124832 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03 23:26:36 +00:00
Oscar Fuentes
d538e24922 Changes for building Clang and others using LLVM as an external
library.

Installs tblgen (required by Clang).

Translates handling of user settings and platform-dependant options to
its own file, where it can included by another project.

Installs the .cmake files required by projects like Clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124816 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03 20:57:36 +00:00
Kevin Enderby
79fcb6dec3 Changed the TableGen created MatchInstructionImpl() setting of ErrorInfo.
The algorithm for identifying which operand is invalid will now always point to
some operand and not the mnemonic sometimes.  The change is now that ErrorInfo
is the index of the highest operand that does not match for any of the matching
mnemonics records.  And no longer the ~0U value when the mnemonic matches and
not every record with a matching mnemonic has the same mismatching operand
index.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124734 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-02 18:20:55 +00:00
Devang Patel
a3138424cf Update to match changes in lldb interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124687 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-01 21:47:35 +00:00
David Greene
9d7f011110 [AVX] Implement EnforceSmallerThan for mixed int/fp type lists. This
makes type checking for extract_subvector and insert_subvector more
robust and will allow stricter typechecking of more patterns in the
future.

This change handles int and fp as disjoint sets so that it will
enforce integer types to be smaller than the largest integer type and
fp types to be smaller than the largest fp type.  There is no attempt
to check type sizes across the int/fp sets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124672 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-01 19:12:32 +00:00
Devang Patel
1531511b2c Tidy up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124605 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-31 21:16:37 +00:00
Devang Patel
e3373b0227 Focus on arguments for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124604 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-31 21:15:39 +00:00
Bob Wilson
9b8c3530cc Fix a comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124450 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-27 23:08:52 +00:00
Douglas Gregor
75f6e89ea9 Clang: separate the access-control diagnostics from other diagnostics that do not have SFINAE behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124440 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-27 21:06:17 +00:00