summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAge
...
* Add support for fetching inlining context (stack of source code locations)Alexey Samsonov2012-09-04
| | | | | | | | | | | | by instruction address from DWARF. Add --inlining flag to llvm-dwarfdump to demonstrate and test this functionality, so that "llvm-dwarfdump --inlining --address=0x..." now works much like "addr2line -i 0x...", provided that the binary has debug info (Clang's -gline-tables-only *is* enough). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163128 91177308-0d34-0410-b5e6-96231b3b80d8
* Code cleanup: tools/opt/opt.cppLogan Chien2012-09-01
| | | | | | | | Remove unused local variable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163061 91177308-0d34-0410-b5e6-96231b3b80d8
* LLI: move instruction cache tweaks.Jim Grosbach2012-08-28
| | | | | | | | Invalidate the instruction cache right before we start actually executing code, otherwise we can miss some that came later. This is still not quite right for a truly lazilly compiled environment, but it's closer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162803 91177308-0d34-0410-b5e6-96231b3b80d8
* Some of the instructions in the Mips instruction set are revisionJack Carter2012-08-28
| | | | | | | | | | | | | | delimited. llvm-mc -disassemble access these through the -mattr option. llvm-objdump -disassemble had no such way to set the attribute so some instructions were just not recognized for disassembly. This patch accepts llvm-mc mechanism for specifying the attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162781 91177308-0d34-0410-b5e6-96231b3b80d8
* Add basic support for .debug_ranges section to LLVM's DebugInfo library.Alexey Samsonov2012-08-27
| | | | | | | | | | | | This section (introduced in DWARF-3) is used to define instruction address ranges for functions that are not contiguous and can't be described by low_pc/high_pc attributes (this is the usual case for inlined subroutines). The patch is the first step to support fetching complete inlining info from DWARF. Reviewed by Benjamin Kramer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162657 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass -lLTO after gold-plugin.o so that it gets used in systems that default toRafael Espindola2012-08-27
| | | | | | | --as-needed. Patch by Felix Geyer. Fixes pr13262. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162652 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the --param ssp-buffer-size= driver option.Chad Rosier2012-08-21
| | | | | | PR9673 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162284 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the `linker_private_weak_def_auto' linkage to `linkonce_odr_auto_hide' toBill Wendling2012-08-17
| | | | | | | | | | | | | | | | | | | | | make it more consistent with its intended semantics. The `linker_private_weak_def_auto' linkage type was meant to automatically hide globals which never had their addresses taken. It has nothing to do with the `linker_private' linkage type, which outputs the symbols with a `l' (ell) prefix among other things. The intended semantic is more like the `linkonce_odr' linkage type. Change the name of the linkage type to `linkonce_odr_auto_hide'. And therefore changing the semantics so that it produces the correct output for the linker. Note: The old linkage name `linker_private_weak_def_auto' will still parse but is not a synonym for `linkonce_odr_auto_hide'. This should be removed in 4.0. <rdar://problem/11754934> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162114 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove references to compression in llvm-ar. It has been a long time since weRafael Espindola2012-08-10
| | | | | | switched from a bytecode+bzip2 to the current bitcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161651 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some coding violations. No functionality change.Bill Wendling2012-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161530 91177308-0d34-0410-b5e6-96231b3b80d8
* Cache a commonly used reference.Bill Wendling2012-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161529 91177308-0d34-0410-b5e6-96231b3b80d8
* Add test triples to fix win32 failures. Revert workaround from r161292.Bob Wilson2012-08-08
| | | | | | I don't have a win32 system to test, so hopefully I got them all fixed here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161519 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up a bit.Jim Grosbach2012-08-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161430 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce indentation by early exiting.Bill Wendling2012-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161356 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a way to grab the target options from the LTO command line.Bill Wendling2012-08-06
| | | | | | | | | | When the command line target options were removed from the LLVM libraries, LTO lost its ability to specify things like `-disable-fp-elim'. Add this back by adding the command line variables to the `lto' project. <rdar://problem/12038729> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161353 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the OpenBSD for Bitrig.Eric Christopher2012-08-06
| | | | | | Patch by David Hill. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161344 91177308-0d34-0410-b5e6-96231b3b80d8
* llc: Try to suppress failures since r161262 .NAKAMURA Takumi2012-08-04
| | | | | | FIXME: Fix several tests on i686-win32 due to lacking of many libraries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161292 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix memcmp code-gen to honor -fno-builtin.Bob Wilson2012-08-03
| | | | | | | | | I noticed that SelectionDAGBuilder::visitCall was missing a check for memcmp in TargetLibraryInfo, so that it would use custom code for memcmp calls even with -fno-builtin. I also had to add a new -disable-simplify-libcalls option to llc so that I could write a test for this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161262 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo (the the => the)Sylvestre Ledru2012-07-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160621 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo library: add support for fetching absolute paths to source filesAlexey Samsonov2012-07-19
| | | | | | | | | (instead of basenames) from DWARF. Use this behavior in llvm-dwarfdump tool. Reviewed by Benjamin Kramer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160496 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove tabs.Bill Wendling2012-07-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160480 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak prose.Chad Rosier2012-07-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160478 91177308-0d34-0410-b5e6-96231b3b80d8
* Target option DisableJumpTables is a gross hack. Move it to TargetLowering ↵Evan Cheng2012-07-02
| | | | | | instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159611 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend TargetPassConfig to allow running only a subset of the normal passes.Bob Wilson2012-07-02
| | | | | | | | | | | | | | | | | This is still a work in progress but I believe it is currently good enough to fix PR13122 "Need unit test driver for codegen IR passes". For example, you can run llc with -stop-after=loop-reduce to have it dump out the IR after running LSR. Serializing machine-level IR is not yet supported but we have some patches in progress for that. The plan is to serialize the IR to a YAML file, containing separate sections for the LLVM IR, machine-level IR, and whatever other info is needed. Chad suggested that we stash the stop-after pass in the YAML file and use that instead of the start-after option to figure out where to restart the compilation. I think that's a great idea, but since it's not implemented yet I put the -start-after option into this patch for testing purposes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159570 91177308-0d34-0410-b5e6-96231b3b80d8
* Need a space.Evan Cheng2012-07-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159565 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch extends the libLLVMDebugInfo which contains a minimalistic DWARF ↵Alexey Samsonov2012-07-02
| | | | | | | | | | parser: 1) DIContext is now able to return function name for a given instruction address (besides file/line info). 2) llvm-dwarfdump accepts flag --functions that prints the function name (if address is specified by --address flag). 3) test case that checks the basic functionality of llvm-dwarfdump added git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159512 91177308-0d34-0410-b5e6-96231b3b80d8
* Move lib/Analysis/DebugInfo.cpp to lib/VMCore/DebugInfo.cpp andBill Wendling2012-06-28
| | | | | | | | | | include/llvm/Analysis/DebugInfo.h to include/llvm/DebugInfo.h. The reasoning is because the DebugInfo module is simply an interface to the debug info MDNodes and has nothing to do with analysis. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159312 91177308-0d34-0410-b5e6-96231b3b80d8
* When users ask for -mcpu=help or -mattr=help, just output the help withoutDuncan Sands2012-06-27
| | | | | | | | | requiring a module. Original patch by Sunay Ismail, simplified by Arnaud de Grandmaison, then complicated by me (if a triple was specified on the command line, output help for that triple, not for the default). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159268 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix llc's -print-before=pass and -print-after=pass.Rafael Espindola2012-06-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159227 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename fp-op fusion option (yet again) for compatibility with GCC option.Lang Hames2012-06-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159042 91177308-0d34-0410-b5e6-96231b3b80d8
* Forgot this patch in r159023.Evan Cheng2012-06-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159028 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename -allow-excess-fp-precision flag to -fuse-fp-ops, and switch from aLang Hames2012-06-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | boolean flag to an enum: { Fast, Standard, Strict } (default = Standard). This option controls the creation by optimizations of fused FP ops that store intermediate results in higher precision than IEEE allows (E.g. FMAs). The behavior of this option is intended to match the behaviour specified by a soon-to-be-introduced frontend flag: '-ffuse-fp-ops'. Fast mode - allows formation of fused FP ops whenever they're profitable. Standard mode - allow fusion only for 'blessed' FP ops. At present the only blessed op is the fmuladd intrinsic. In the future more blessed ops may be added. Strict mode - allow fusion only if/when it can be proven that the excess precision won't effect the result. Note: This option only controls formation of fused ops by the optimizers. Fused operations that are explicitly requested (e.g. FMA via the llvm.fma.* intrinsic) will always be honored, regardless of the value of this option. Internally TargetOptions::AllowExcessFPPrecision has been replaced by TargetOptions::AllowFPOpFusion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158956 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-stress: Stabalize (by using an ordered container) and add randomness to ↵Nadav Rotem2012-06-21
| | | | | | the order in which loops are generated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158908 91177308-0d34-0410-b5e6-96231b3b80d8
* Add DAG-combines for aggressive FMA formation.Lang Hames2012-06-19
| | | | | | | | | | | | | | | | | | | | | | This patch adds DAG combines to form FMAs from pairs of FADD + FMUL or FSUB + FMUL. The combines are performed when: (a) Either AllowExcessFPPrecision option (-enable-excess-fp-precision for llc) OR UnsafeFPMath option (-enable-unsafe-fp-math) are set, and (b) TargetLoweringInfo::isFMAFasterThanMulAndAdd(VT) is true for the type of the FADD/FSUB, and (c) The FMUL only has one user (the FADD/FSUB). If your target has fast FMA instructions you can make use of these combines by overriding TargetLoweringInfo::isFMAFasterThanMulAndAdd(VT) to return true for types supported by your FMA instruction, and adding patterns to match ISD::FMA to your FMA instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158757 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the support for using .init_array from ARM to the genericRafael Espindola2012-06-19
| | | | | | | | | | TargetLoweringObjectFileELF. Use this to support it on X86. Unlike ARM, on X86 it is not easy to find out if .init_array should be used or not, so the decision is made via TargetOptions and defaults to off. Add a command line option to llc that enables it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158692 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove assignments which aren't used afterwards.Bill Wendling2012-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158534 91177308-0d34-0410-b5e6-96231b3b80d8
* Use LTO_CODEGEN_PIC_MODEL_DYNAMIC for PIE. This requirest a git version ofRafael Espindola2012-06-13
| | | | | | | | gold to work. Since the enum value LDPO_PIE has just been added to plugin-api.h, use a numeric constant for now so that we don't require an unreleased version of gold to build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158402 91177308-0d34-0410-b5e6-96231b3b80d8
* Object file output from llc isn't experimental anymore.Benjamin Kramer2012-06-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158305 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-nm] Update documentation to cover object file support and arguments.Michael J. Spencer2012-06-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158120 91177308-0d34-0410-b5e6-96231b3b80d8
* Round 2 of dead private variable removal.Benjamin Kramer2012-06-06
| | | | | | | | LLVM is now -Wunused-private-field clean except for - lib/MC/MCDisassembler/Disassembler.h. Not sure why it keeps all those unaccessible fields. - gtest. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158096 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused private fields found by clang's new -Wunused-private-field.Benjamin Kramer2012-06-06
| | | | | | | | There are some that I didn't remove this round because they looked like obvious stubs. There are dead variables in gtest too, they should be fixed upstream. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158090 91177308-0d34-0410-b5e6-96231b3b80d8
* Reinstate -O3 for LTO.David Blaikie2012-05-30
| | | | | | | | | | | | | | | | | This broke in r144788 when the CodeGenOpt option was moved from everywhere else (specifically, from addPassesToEmitFile) to createTargetMachine. Since LTOCodeGenerator wasn't passing the 4th argument, when the 4th parameter became the 3rd, it silently continued to compile (int->bool conversion) but meant something completely different. This change preserves the existing (accidental) and previous (default) semantics of the addPassesToEmitFile and restores the previous/intended CodeGenOpt argument by passing it appropriately to createTargetMachine. (discovered by pending changes to -Wconversion to catch constant->bool conversions) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157705 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an insertPass API to TargetPassConfig. <rdar://problem/11498613>Bob Wilson2012-05-30
| | | | | | | | | | Besides adding the new insertPass function, this patch uses it to enhance the existing -print-machineinstrs so that the MachineInstrs after a specific pass can be printed. Patch by Bin Zeng! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157655 91177308-0d34-0410-b5e6-96231b3b80d8
* ConstantRangesSet renamed to IntegersSubset. CRSBuilder renamed to ↵Stepan Dyatkovskiy2012-05-29
| | | | | | IntegersSubsetMapping. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157612 91177308-0d34-0410-b5e6-96231b3b80d8
* Plug a leak when using MCJIT.Benjamin Kramer2012-05-20
| | | | | | Found by valgrind. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157160 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extra semicolons.Benjamin Kramer2012-05-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157118 91177308-0d34-0410-b5e6-96231b3b80d8
* Ordinary PR1255 patch: DifferenceEngine and CPPBackend adopted to the new ↵Stepan Dyatkovskiy2012-05-19
| | | | | | SwitchInst methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157112 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor data-in-code annotations.Jim Grosbach2012-05-18
| | | | | | | | | | | | | | | | | | | | | | Use a dedicated MachO load command to annotate data-in-code regions. This is the same format the linker produces for final executable images, allowing consistency of representation and use of introspection tools for both object and executable files. Data-in-code regions are annotated via ".data_region"/".end_data_region" directive pairs, with an optional region type. data_region_directive := ".data_region" { region_type } region_type := "jt8" | "jt16" | "jt32" | "jta32" end_data_region_directive := ".end_data_region" The previous handling of ARM-style "$d.*" labels was broken and has been removed. Specifically, it didn't handle ARM vs. Thumb mode when marking the end of the section. rdar://11459456 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157062 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed a bug in llvm-objdump when disassembling using -macho option for a binaryKevin Enderby2012-05-18
| | | | | | | containing no symbols. Fixed the crash and fixed it not disassembling anything. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157031 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLIMCJITMemoryManager to the lli. This manager will be used for MCJIT ↵Danil Malyshev2012-05-16
| | | | | | | | instead of DefaultJIMMemoryManager. It's more flexible for MCJIT tasks, in addition it's provides a invalidation instruction cache for code sections which will be used before JIT code will be executed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156933 91177308-0d34-0410-b5e6-96231b3b80d8