summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* Generate functions in 2 steps in the C API echo test. NFCAmaury Sechet2016-02-161-6/+32
| | | | llvm-svn: 260939
* Restore the capability to manipulate datalayout from the C APIAmaury Sechet2016-02-161-0/+6
| | | | | | | | | | | | | | | | | Summary: This consist in variosu addition to the C API: LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M); void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL); LLVMTargetDataRef LLVMCreateTargetMachineData(LLVMTargetMachineRef T); Reviewers: joker.eph, Wallbraker, echristo Subscribers: axw Differential Revision: http://reviews.llvm.org/D17255 llvm-svn: 260936
* Use report_fatal_error more consistently in the C API echo testAmaury Sechet2016-02-141-73/+33
| | | | llvm-svn: 260849
* Get constant cloning out of CloneValue so it can be used when creating globals.Amaury Sechet2016-02-141-40/+47
| | | | llvm-svn: 260848
* Move clone_params aroundAmaury Sechet2016-02-141-78/+76
| | | | llvm-svn: 260846
* [llvm-size] Remove variable used only once.Davide Italiano2016-02-131-8/+4
| | | | | | The use of auto and the name were very weird anyway. llvm-svn: 260789
* [llvm-size] Make error handling uniform.Davide Italiano2016-02-131-32/+9
| | | | llvm-svn: 260786
* [llvm-pdbdump] Start to decode some streamsDavid Majnemer2016-02-121-29/+253
| | | | | | We can decode a little bit of the first stream now. llvm-svn: 260754
* [CMake] don't build libLTO when LLVM_ENABLE_PIC is OFFHans Wennborg2016-02-121-1/+1
| | | | | | | | | | | | | | When cmake is run with -DLLVM_ENABLE_PIC=OFF, build fails while linking shared library libLTO.so, because its dependencies are built with -fno-PIC. More details here: https://llvm.org/bugs/show_bug.cgi?id=26484. This diff reverts r252652 (git 9fd4377ddb83aee3c049dc8757e7771edbb8ee71), which removed check NOT LLVM_ENABLE_PIC before disabling build for libLTO.so. Patch by Igor Sugak! Differential Revision: http://reviews.llvm.org/D17049 llvm-svn: 260703
* llvm-config: replace assertions with a helpful error messageMehdi Amini2016-02-121-0/+8
| | | | | From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 260700
* [sancov] improved object files handling.Mike Aizatsky2016-02-121-101/+278
| | | | | | | | | | | | | | | | | | | Multi-dso programs result in multiple coverage files dumped of the form '<module_name>.<pid>.sancov'. When analyzing these coverage files it is important to use correct corresponding object file. This change removes the "-obj" sancov flag and lets user specify object file names alongside coverage files. Sancov tool would match them using <module_name> part of coverage file and short file name of the object file. Corresponding changes: - compiler-rt: http://reviews.llvm.org/D17171 - docs: http://reviews.llvm.org/D17175 Differential Revision: http://reviews.llvm.org/D17169 llvm-svn: 260628
* [codeview] Dump def range lengths in hexReid Kleckner2016-02-111-3/+3
| | | | | | | It makes it easier to correlate with assembly dumps, which are typically given with hex offsets. llvm-svn: 260619
* Add support for phi nodes in the LLVM C API testAmaury Sechet2016-02-111-18/+37
| | | | | | | | | | | | Summary: This required to add binding to Instruction::removeFromParent so that instruction can be forward declared and then moved at the right place. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17057 llvm-svn: 260597
* [CMake] Produce an empty library for GlobalISel when not building it.Quentin Colombet2016-02-111-8/+0
| | | | | | | | | | | | | | | | The rational for this change is that LLVMBuild cannot express conditional dependencies. Therefore, when we start optionally using GlobalISel library for say AArch64, without that change, all the tools that use the AArch64 library would need to explicitly link with GlobalISel when we ask for it. This does not scale. Instead, we will set the dependencies between the target and GlobalISel and if we did not ask to build GlobalISel, the library will just be empty. Thanks to Chris Bieneman and Mehdi Animi for the idea. llvm-svn: 260566
* [readobj] Dump DT_JMPREL relocations when outputting dynamic relocations.Michael J. Spencer2016-02-111-0/+28
| | | | llvm-svn: 260489
* [readobj] Handle ELF files with no section table or with no program headers.Michael J. Spencer2016-02-112-98/+159
| | | | | | | | This adds support for finding the dynamic table and dynamic symbol table via the section table or the program header table. If there's no section table an attempt is made to figure out the length of the dynamic symbol table. llvm-svn: 260488
* [readobj] Move dynamic table parsing to a new function. NFC.Michael J. Spencer2016-02-111-5/+14
| | | | llvm-svn: 260487
* [readobj] Sort switch by enum value.Michael J. Spencer2016-02-111-29/+29
| | | | | | | Sort by enum value, but keep related entries adjacent. This makes it easier to compare against documentation. llvm-svn: 260486
* [readobj] Parse sections before dynamic table.Michael J. Spencer2016-02-111-36/+36
| | | | | | | NFC. This code will be expanded to handle dynamic tables that don't have a PT_DYNAMIC. llvm-svn: 260485
* Fix const confusion while lambda function usageHemant Kulkarni2016-02-111-24/+26
| | | | llvm-svn: 260484
* [llvm-nm] Simplify code logic. Rewrite a single function an inline.Davide Italiano2016-02-111-16/+4
| | | | llvm-svn: 260482
* Fix build failure caused in r260430Hemant Kulkarni2016-02-111-1/+1
| | | | llvm-svn: 260471
* [llvm-nm] Minor style change. Prefer EXIT_SUCCESS over 0.Davide Italiano2016-02-101-1/+1
| | | | llvm-svn: 260470
* [llvm-nm] Prefer range-based loop over explicit iterator.Davide Italiano2016-02-101-3/+2
| | | | llvm-svn: 260459
* Restore "[ThinLTO] Use MD5 hash in function index." with fixTeresa Johnson2016-02-101-0/+1
| | | | | | | | | | | This restores commit r260408, along with a fix for a bot failure. The bot failure was caused by dereferencing a unique_ptr in the same call instruction parameter list where it was passed via std::move. Apparently due to luck this was not exposed when I built the compiler with clang, only with gcc. llvm-svn: 260442
* [llvm-readobj] Option to emit readelf like outputHemant Kulkarni2016-02-105-283/+412
| | | | | | | | | New option --elf-output-style=LLVM or GNU Enables -file-headers in readelf style when elf-output-style=GNU Differential revision: http://reviews.llvm.org/D14128 llvm-svn: 260430
* Revert "[ThinLTO] Use MD5 hash in function index." due to bot failureTeresa Johnson2016-02-101-1/+0
| | | | | | This reverts commit r260408. Bot failure that I need to investigate. llvm-svn: 260412
* [ThinLTO] Use MD5 hash in function index.Teresa Johnson2016-02-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch uses the lower 64-bits of the MD5 hash of a function name as a GUID in the function index, instead of storing function names. Any local functions are first given a global name by prepending the original source file name. This is the same naming scheme and GUID used by PGO in the indexed profile format. This change has a couple of benefits. The primary benefit is size reduction in the combined index file, for example 483.xalancbmk's combined index file was reduced by around 70%. It should also result in memory savings for the index file in memory, as the in-memory map is also indexed by the hash instead of the string. Second, this enables integration with indirect call promotion, since the indirect call profile targets are recorded using the same global naming convention and hash. This will enable the function importer to easily locate function summaries for indirect call profile targets to enable their import and subsequent promotion. The original source file name is recorded in the bitcode in a new module-level record for use in the ThinLTO backend pipeline. Reviewers: davidxl, joker.eph Subscribers: llvm-commits, joker.eph Differential Revision: http://reviews.llvm.org/D17028 llvm-svn: 260408
* Revert "[llvm-readobj] Option to emit readelf like output"Hemant Kulkarni2016-02-105-411/+283
| | | | | | This reverts commit a58765909660a7195b32e0cc8c7476168b913750. llvm-svn: 260397
* [llvm-nm] Add -radix optionHemant Kulkarni2016-02-101-3/+30
| | | | | | Differential Revision: http://reviews.llvm.org/D16822 llvm-svn: 260392
* [llvm-readobj] Option to emit readelf like outputHemant Kulkarni2016-02-105-283/+411
| | | | | | | | | New option --elf-output-style=LLVM or GNU Enables -file-headers in readelf style when elf-output-style=GNU Differential revision: http://reviews.llvm.org/D14128 llvm-svn: 260391
* [PGO] Differentiate Clang instrumentation and IR level instrumentation profilesRong Xu2016-02-101-4/+11
| | | | | | | | | | | | | | | | | | | | This patch uses one bit in profile version to differentiate Clang instrumentation and IR level instrumentation profiles. PGOInstrumenation generates a COMDAT variable __llvm_profile_raw_version so that the compiler runtime can set the right profile kind. For Maco-O platform, we generate the variable as linkonce_odr linkage as COMDAT is not supported. PGOInstrumenation now checks this bit to make sure it's an IR level instrumentation profile. The patch was submitted as r260164 but reverted due to a Darwin test breakage. Original Differential Revision: http://reviews.llvm.org/D15540 Differential Revision: http://reviews.llvm.org/D17020 llvm-svn: 260385
* llvm-config: Fix DLL prefix on cygming.NAKAMURA Takumi2016-02-101-1/+1
| | | | | | For example, LLVMSupport takes the form of LLVMSupport.dll, not libLLVMSupport.dll. llvm-svn: 260351
* llvm-config: Quick fix for cross compilation. Don't be confsed between host ↵NAKAMURA Takumi2016-02-101-1/+1
| | | | | | | and target. It has been there since r252532. FIXME: The clause may use conditions of host compiler, not HOST_TRIPLE. llvm-svn: 260343
* [Orc] Add lazy-JITting support for i386.Lang Hames2016-02-101-0/+11
| | | | | | | | | | | This patch adds a new class, OrcI386, which contains the hooks needed to support lazy-JITing on i386 (currently only for Pentium 2 or above, as the JIT re-entry code uses the FXSAVE/FXRSTOR instructions). Support for i386 is enabled in the LLI lazy JIT and the Orc C API, and regression and unit tests are enabled for this architecture. llvm-svn: 260338
* Add support for struct in C API testAmaury Sechet2016-02-101-77/+125
| | | | | | | | | | | | Summary: As per title. This also include extra support for insertvalue and extracvalue. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D17055 llvm-svn: 260335
* Add binding for counting argument and find called value of call and invoke ↵Amaury Sechet2016-02-101-2/+2
| | | | | | | | | | | | instruction from the C API. Summary: As per title. This remove the need to rely on internal knowledge of call and invoke instruction to find called value and argument count. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Differential Revision: http://reviews.llvm.org/D17054 llvm-svn: 260332
* Split clone value and instruction in the echo C API testAmaury Sechet2016-02-091-73/+77
| | | | | | | | | | Summary: This is a bit of refactoring required to be able to generate instruction in forward basic block. This, for instance, is a requirement for phi in loops. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Differential Revision: http://reviews.llvm.org/D17050 llvm-svn: 260324
* Add icmp and conditional branches in the C API echo test.Amaury Sechet2016-02-091-2/+20
| | | | | | | | | | | | | | | Summary: Improving coverage. Depends on D16912 . Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16937 llvm-svn: 260321
* Add C binding for AllocaInst::getAllocatedTypeAmaury Sechet2016-02-091-1/+2
| | | | | | | | | | | | | | | Summary: Comes with an awesome test. Depends on D16912 Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16942 llvm-svn: 260313
* Improve the C API echo test tool to emit basic block is the right order.Amaury Sechet2016-02-091-214/+260
| | | | | | | | | | | | Summary: As per title. Also add a facility method to get the name of a basic block from the C API. Reviewers: bogner, chandlerc, echristo, dblaikie, joker.eph, Wallbraker Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16912 llvm-svn: 260309
* This brings back commit r259578.Rafael Espindola2016-02-091-0/+20
| | | | | | | But now it follows the llvm style, uses an early return and doesn't include a file named 1.o. llvm-svn: 260293
* Fix name style.Rafael Espindola2016-02-091-30/+30
| | | | | | Functions start with a lower case, variables with an upper case. llvm-svn: 260287
* Update comment style.Rafael Espindola2016-02-091-14/+14
| | | | llvm-svn: 260286
* Revert "Correct size calculations for ELF files"Rafael Espindola2016-02-091-20/+0
| | | | | | | | | This reverts commit r259578. There are enough issues with this small patch that it is better to revert and then commit a fixed version (will be committed shortly). llvm-svn: 260285
* llvm-config: Add preliminary Windows supportEhsan Akhgari2016-02-092-34/+59
| | | | | | | | | | | | | | | | | Summary: This patch adds Windows support for a few of the llvm-config commands, including cflags, ldflags, libs, and system-libs. Currently llvm-config is untested, so this patch adds tests for the commands that it fixes as well. Reviewers: rnk Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16762 llvm-svn: 260263
* [llvm-readobj][ELF] Show MIPS GOT content when there is another zero-sized ↵Simon Atanasyan2016-02-091-40/+25
| | | | | | | | | | | | | section at the same address It is possible to have .got section and one or more zero-sized section at the same address. This patch first checks that GOT (or GOT PLT) section should have non-zero size using corresponding dynamic tags. Then it looks up not empty section at the specified address. Differential Revision: http://reviews.llvm.org/D16968 llvm-svn: 260245
* Fix a formatting problems with llvm-size and the -m option.Kevin Enderby2016-02-091-4/+6
| | | | | | | | | | It was using format() with a string for 64-bit types but was passed a 32-bit type in places when printing values for 32-bit Mach-O files. rdar://24542509 llvm-svn: 260243
* [llvm-nm] Remove excessive parenthesis, noticed by David Blaikie.Davide Italiano2016-02-081-3/+3
| | | | llvm-svn: 260173
* [PGO] Revert r260146 as it breaks Darwin platforms.Rong Xu2016-02-081-11/+4
| | | | | | | r260146 | xur | 2016-02-08 13:07:46 -0800 (Mon, 08 Feb 2016) | 13 lines [PGO] Differentiate Clang instrumentation and IR level instrumentation profiles llvm-svn: 260170
OpenPOWER on IntegriCloud