aboutsummaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2013-03-28Target Cortex-A9 with NEON in PNaCl's LLC driver.JF Bastien
This is a follow-up to: https://codereview.chromium.org/12683004/ https://codereview.chromium.org/12969002/ And will enable optiomizations for our minimum platform when translating with default flags. At some point we'll probably want to specialize further by detecting, e.g. A15 and turning on VFP4, IDIV, etc... R= dschuff@chromium.org, jvoung@chromium.org Review URL: https://codereview.chromium.org/13224003
2013-03-27Make pnacl-abicheck return nonzero status if errors are found.Derek Schuff
Also add -q flag for quiet operation; i.e. don't print the errors, only use the exit status to indicate failure. R=mseaborn@chromium.org,jvoung@chromium.org BUG= https://code.google.com/p/nativeclient/issues/detail?id=2309 Review URL: https://codereview.chromium.org/13117004
2013-03-26PNaCl: Add ExpandGetElementPtr pass for converting GetElementPtr to arithmeticMark Seaborn
This is similar to the GEP handling in visitGetElementPtr() in lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp. Once this pass is enabled, it will simplify the language to reduce the set of constructs that a PNaCl translator needs to handle as part of a stable wire format for PNaCl. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3343 TEST=test/Transforms/NaCl/expand-getelementptr.ll Review URL: https://codereview.chromium.org/12849009
2013-03-25PNaCl ABI: add passes to cleanup/finalize some linkage types and resolve ↵Derek Schuff
aliases. R=mseaborn@chromium.org,eliben@chromium.org BUG= https://code.google.com/p/nativeclient/issues/detail?id=3339 Review URL: https://codereview.chromium.org/13036005
2013-03-25Add -time-ir-parsing flag to llc.Eli Bendersky
This is in the process of being added upstream but the exact location is still debated and will take some time to settle. In the mean-time I'm adding it as a localmod so we can run our benchmarks effectively. Later this should be switched to the upstream implementation (or move to our own llc-replacement-driver). BUG=https://code.google.com/p/nativeclient/issues/detail?id=3349
2013-03-21PNaCl: Add ExpandVarArgs pass for expanding out variable-args function callsMark Seaborn
Once this pass is enabled, it will simplify the language to reduce the set of constructs that a PNaCl translator needs to handle as part of a stable wire format for PNaCl. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3338 TEST=test/Transforms/NaCl/expand-varargs.ll Review URL: https://codereview.chromium.org/12481021
2013-03-20Merge remote-tracking branch 'origin/master'Eli Bendersky
Merge Nacl-LLVM work since the upstream merge branched
2013-03-15PNaCl: Add ExpandConstantExpr pass for converting ConstantExprs to InstructionsMark Seaborn
Once this pass is enabled, it will simplify the language to reduce the set of constructs that a PNaCl translator needs to handle as part of a stable wire format for PNaCl. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3337 TEST=test/Transforms/NaCl/expand-constantexpr.ll Review URL: https://codereview.chromium.org/12792011
2013-03-14Fix CMakeFile as well.Derek Schuff
Carryover from https://codereview.chromium.org/12690007
2013-03-14Fix LLVMBuild.txt for NaCl analysis passesDerek Schuff
R=jvoung@chromium.org BUG= Sandboxed LLC doesn't build correctly anymore without it Review URL: https://codereview.chromium.org/12432018
2013-03-14Cleanup of ABI CheckerDerek Schuff
Fix spacing of error output, use OwningPtr everywhere at top level, fix command line parsing R=jvoung@chromium.org BUG= Review URL: https://codereview.chromium.org/12690007
2013-03-13ABI verifier: Add standalone tool pnacl-abicheckDerek Schuff
This CL adds a standalone tool pnacl-abicheck for checking the ABI validity of a bitcode file. It also adds a flag pnaclabi-verify to llc to enable the same checking in llc. It also improves the mechanism for handling and reporting validation errors and uses it in both tools. R=jvoung@chromium.org,mseaborn@chromium.org BUG= https://code.google.com/p/nativeclient/issues/detail?id=2309 Review URL: https://codereview.chromium.org/12449014
2013-03-11Merge commit '279b9184c2ff4fea93b198a3519b8cb3a1d8d195'Eli Bendersky
Conflicts: include/llvm/CodeGen/LexicalScopes.h include/llvm/MC/MCAsmInfo.h lib/Linker/LinkArchives.cpp lib/Linker/LinkItems.cpp lib/MC/MCAsmInfo.cpp lib/MC/MCDwarf.cpp lib/Target/ARM/ARMInstrInfo.td lib/Target/ARM/ARMSubtarget.cpp lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp lib/Target/Mips/MipsAsmPrinter.cpp lib/Target/Mips/MipsDelaySlotFiller.cpp lib/Target/Mips/MipsISelDAGToDAG.cpp lib/Target/Mips/MipsSubtarget.cpp lib/Target/Mips/MipsSubtarget.h lib/Target/Mips/MipsTargetObjectFile.cpp lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp lib/Target/X86/X86FastISel.cpp lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86TargetMachine.cpp lib/Transforms/CMakeLists.txt lib/Transforms/LLVMBuild.txt lib/Transforms/Makefile test/MC/ARM/arm_instructions.s test/MC/X86/AlignedBundling/pad-align-to-bundle-end.s
2013-03-06Add an RPC to LLC.nexe to init with appended flags (vs set all flags).Jan Voung
This will take the default flags and append any extra flags. For now, this is only intended to support -O in the browser, and perhaps -mcpu=.*, -mattr=. We move the tuning parameters like -mcpu out of the default, so that a user does not end up setting the -mcpu more than once (which is disallowed). What does go into the default is -mtriple, which we may want to hard-code into the build somehow (but it's not yet clear how to do that cleanly). That way, a user does not need to specify that portion. We also hardcode the -sfi-* flags. Sort of tested by: https://codereview.chromium.org/12459004/ BUG= https://code.google.com/p/nativeclient/issues/detail?id=3325 Review URL: https://codereview.chromium.org/12490004
2013-02-27print TLS segmentShankar Easwaran
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176192 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-26Try to get rid of a -wunitialized warning: explicitly initialize the pointerEli Bendersky
to NULL and use asserts to check in relevant places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176134 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-26Fix auto_ptr is deprecated warningsMatt Arsenault
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176123 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-25Provide workaround for PR 15130.Andrew Kaylor
This changes the RecordingMemoryManager in lli to use mapped memory rather than malloc to allocate memory for sections and uses a 'near' MemoryBlock to keep the allocations together. This works around a problem in MCJIT where relocations are applied to a generated image immediately oupon generation, which isn't appropriate for the remote case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176057 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21[objdump] Add PT_PHDR.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175709 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-20Explicitly set a buffer size for sandboxed llc's objfile.Jan Voung
Otherwise it is "buffered", but the buffer size is 0. Unbuffered writes add 1 second of sys time to translation time of gcc. With a large buffer, sys time is again near 0. BUG= http://code.google.com/p/nativeclient/issues/detail?id=3315 Review URL: https://codereview.chromium.org/12317019
2013-02-20[objdump] Print the PT_INTERP and PT_DYNAMIC correcctly.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175659 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-20[llvm-readobj] Add ELF .dynamic table dumping.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175592 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-19Prune AsmParser (target and generic).Jan Voung
This is for the sandboxed llvm translator. Rough estimate, from companion test: https://codereview.chromium.org/12218141/ """ Pruned out approx 35099 bytes worth of MCAsmParser symbols Pruned out approx 49935 bytes worth of ::AsmParser symbols Pruned out approx 183308 bytes worth of ARMAsmParser symbols Pruned out approx 54552 bytes worth of X86AsmParser symbols Pruned out approx 11415 bytes worth of ELFAsmParser symbols Pruned out approx 7253 bytes worth of COFFAsmParser symbols Pruned out approx 18450 bytes worth of DarwinAsmParser symbols Pruned out approx 403 bytes worth of MCAsmLexer symbols Pruned out approx 7009 bytes worth of ::AsmLexer symbols Pruned out approx 359436 bytes worth of MatchTable symbols """ BUG= https://code.google.com/p/nativeclient/issues/detail?id=1222 Review URL: https://codereview.chromium.org/12218139
2013-02-15clang-formatize llvm-symbolizer codeAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175255 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-14llvm-symbolizer: speedup symbol lookupDmitry Vyukov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175158 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-13Use 'RC_XBS' instead of 'RC_BUILDIT' to catch all times when it's built in ↵Bill Wendling
the Apple way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175069 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12llvm-sb: Remove non-streaming code path and write to file directly.Jan Voung
This avoids a use of the ParseIR/ParseIRFile API in the sandboxed translator. ParseIR and friends are flexible and handle LLVM .ll parsing. We only need to handle bitcode streams... By removing a use of ParseIR*, LTO will remove all LLParser-related code. Helps reduce the size of the sandboxed LLC by a couple hundred KB. Also, finally do the cleanup that makes the translator write to its output file directly, rather than writing to a string stream before finally writing the output to a file. May save a couple of MB of memory (size of the object file)... BUG= http://code.google.com/p/nativeclient/issues/detail?id=1222 Review URL: https://codereview.chromium.org/12224132
2013-02-12Add static cast to unsigned char whenever a character classification ↵Guy Benyei
function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175006 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-12Add support for the pubnames section to llvm-dwarfdump.Krzysztof Parzyszek
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174976 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-10Update with attribute group IDs.Bill Wendling
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174847 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-08[readobj] Fix memory leak.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174687 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05Initial support for DWARF CFI parsing and dumping in LLVMEli Bendersky
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174463 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05[objdump,readobj] Document the purpose and goals of each tool.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174439 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-05Print error messages from MemoryBuffer::getFile() in llvm-symbolizerAlexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174346 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-04Replace global std::string with const char[]Alexey Samsonov
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174332 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-03[Object][Archive] Improve performance.Michael J. Spencer
Improve performance of iterating over children and accessing the member file buffer by caching the file size and moving code out to the header. This also makes getBuffer return a StringRef instead of a MemoryBuffer. Both fixing a memory leak and removing a malloc. This takes getBuffer from ~10% of the time in lld to unmeasurable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174272 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31Fix a copy/paste-o that got missed because 'check' doesn't build lto.Chandler Carruth
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174115 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31Give the MCStreamer class hierarchy LLVM RTTI facilities for use withChandler Carruth
isa<> and dyn_cast<>. In several places, code is already hacking around the absence of this, and there seem to be several interfaces that might be lifted and/or devirtualized using this. This change was based on a discussion with Jim Grosbach about how best to handle testing for specific MCStreamer subclasses. He said that this was the correct end state, and everything else was too hacky so I decided to just make it so. No functionality should be changed here, this is just threading the kind through all the constructors and setting up the classof overloads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174113 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-31Cherry-pick r174067Derek Schuff
2013-01-30Merge commit 'a662a9862501fc86904e90054f7c1519101d9126'Derek Schuff
Conflicts: include/llvm/CodeGen/IntrinsicLowering.h include/llvm/MC/MCAssembler.h include/llvm/MC/MCObjectStreamer.h lib/LLVMBuild.txt lib/Linker/LinkArchives.cpp lib/MC/MCAssembler.cpp lib/MC/MCELFStreamer.cpp lib/MC/MCParser/AsmParser.cpp lib/MC/MCPureStreamer.cpp lib/MC/WinCOFFStreamer.cpp lib/Makefile lib/Support/Unix/Memory.inc lib/Support/Unix/Process.inc lib/Support/Unix/Program.inc lib/Target/ARM/ARM.h lib/Target/ARM/ARMFastISel.cpp lib/Target/ARM/ARMISelLowering.cpp lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp lib/Target/Mips/MipsInstrFPU.td lib/Target/X86/CMakeLists.txt lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86TargetMachine.cpp lib/Target/X86/X86TargetObjectFile.cpp lib/Transforms/InstCombine/InstCombineCalls.cpp test/CodeGen/X86/fast-isel-x86-64.ll tools/llc/llc.cpp tools/lto/LTOModule.cpp utils/TableGen/EDEmitter.cpp
2013-01-28Add support for source and line information to IntelJITEventListener for ↵Andrew Kaylor
object emitted by MCJIT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173712 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-28Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation ↵Michael Gottesman
for refactoring the ARC Optimizer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173647 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-26Add DIContext::getLineInfoForAddressRange() function and test. This ↵Andrew Kaylor
function allows a caller to obtain a table of line information for a function using the function's address and size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173537 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25Add support for applying in-memory relocations to the .debug_line section ↵Andrew Kaylor
and, in the case of ELF files, using symbol addresses when available for relocations to the .debug_info section. Also extending the llvm-rtdyld tool to add the ability to dump line number information for testing purposes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173517 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25When encountering an unknown file format, ObjectFile::createObjectFile shouldEli Bendersky
politely report it instead of running into llvm_unreachable. Also patch llvm-dwarfdump to actually check whether the file it's attempting to dump is a valid object file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173489 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25Add command-line flags for DWARF dumping.Eli Bendersky
Flags for dumping specific DWARF sections added in lib/DebugInfo and llvm-dwarfdump. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173480 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-25Rename variable to be more comprehensible and follow naming conventionEli Bendersky
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173460 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24[bugpoint] make tool selection messages uniqueSaleem Abdulrasool
Change messages to help identify which interpreter was actually selected (safe vs testing). Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> Reviewed-by: Chandler Carruth <chandlerc@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173360 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24[bugpoint] set Message after tool configurationSaleem Abdulrasool
Set the message returned after the GCC runner has been constructed as otherwise the message will be overwritten by the construction of the runner, resulting in misleading messages. Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org> Reviewed-by: Chandler Carruth <chandlerc@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173359 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-24lli/RecordingMemoryManager: Free allocated sections in the destructor to ↵NAKAMURA Takumi
satisfy --vg-leak! FIXME: It could be generalized in MemoryManager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173349 91177308-0d34-0410-b5e6-96231b3b80d8