summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/LanguageRuntime/RenderScript
Commit message (Collapse)AuthorAgeFilesLines
...
* Update for LLVM API removal of Function::getArgumentList()Reid Kleckner2017-03-161-2/+1
| | | | llvm-svn: 298011
* Remove FileSpec::ReadFileContents.Zachary Turner2017-03-061-2/+3
| | | | | | | | | | | | | | | | This functionality is subsumed by DataBufferLLVM, which is also more efficient since it will try to mmap. However, we don't yet support mmaping writable private sections, and in some cases we were using ReadFileContents and then modifying the buffer. To address that I've added a flag to the DataBufferLLVM methods that allow you to map privately, which disables the mmaping path entirely. Eventually we should teach DataBufferLLVM to use mmap with writable private, but that is orthogonal to this effort. Differential Revision: https://reviews.llvm.org/D30622 llvm-svn: 297095
* Isolate Target-specific functionality of DataExtractor.Zachary Turner2017-03-031-2/+4
| | | | | | | | | | | | | | | | In an effort to move the various DataBuffer / DataExtractor classes from Core -> Utility, we have to separate the low-level functionality from the higher level functionality. Only a few functions required anything other than reading/writing raw bytes, so those functions are separated out into a more appropriate area. Specifically, Dump() and DumpHexBytes() are moved into free functions in Core/DumpDataExtractor.cpp, and GetGNUEHPointer is moved into a static function in the only file that it's referenced from. Differential Revision: https://reviews.llvm.org/D30560 llvm-svn: 296910
* Move Log from Core -> Utility.Zachary Turner2017-03-034-4/+4
| | | | | | | | | All references to Host and Core have been removed, so this class can now safely be lowered into Utility. Differential Revision: https://reviews.llvm.org/D30559 llvm-svn: 296909
* Clean up debug loggingPavel Labath2017-02-131-3/+2
| | | | | | | | | | | | | | | | | | | | | Summary: We've had two ways to print a "debug" log message. - Log::GetDebug() was testing a Stream flag which was never set. - Log::Debug() was checking for the presence of "log enable --debug" flag. Given that these two were used very rarely and we already have a different way to specify "I want a more verbose log", I propose to remove these two functions and migrate the callers to LLDB_LOGV. This commit does that. Reviewers: clayborg, zturner Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D29823 llvm-svn: 294939
* Move classes from Core -> Utility.Zachary Turner2017-02-022-5/+5
| | | | | | | | | | | | | | | | | | | | | | | This moves the following classes from Core -> Utility. ConstString Error RegularExpression Stream StreamString The goal here is to get lldbUtility into a state where it has no dependendencies except on itself and LLVM, so it can be the starting point at which to start untangling LLDB's dependencies. These are all low level and very widely used classes, and previously lldbUtility had dependencies up to lldbCore in order to use these classes. So moving then down to lldbUtility makes sense from both the short term and long term perspective in solving this problem. Differential Revision: https://reviews.llvm.org/D29427 llvm-svn: 293941
* [CMake] [2/4] Update a batch of pluginsChris Bieneman2017-01-311-1/+17
| | | | | | This is extending the updates from r293696 to more LLDB plugins. llvm-svn: 293699
* Make lldb -Werror clean for -Wstring-conversionDavid Blaikie2017-01-061-2/+2
| | | | | | | | | Also found/fixed one bug identified by this warning in RenderScriptx86ABIFixups.cpp where a string literal was being used in an effort to provide a name for an instruction/register, but was instead being passed as the bool 'isVolatile' parameter. llvm-svn: 291198
* Add a debuginfo version check for RenderScript modulesLuke Drummond2017-01-042-1/+53
| | | | | | | | | | Added an extra field parser to the `RSModuleDescriptor` class enabling us to check whether the versions of LLVM used to generated the debug symbols match across the RenderScript compiler frontend (llvm-rs-cc) and backend (bcc); if they do not, we warn the user that the debugging experience may be suboptimal as LLVM IR debug information has no compatibility guarantees. llvm-svn: 290957
* Fix an unannotated fallthrough that was causing a warning.Greg Clayton2016-12-071-1/+2
| | | | llvm-svn: 289000
* [lldb] Fix typos in file headersAlexander Shaposhnikov2016-11-264-4/+4
| | | | | | | | | | | | | This diff fixes typos in file headers (incorrect file names). Test plan: Under llvm/tools/lldb/source: find ./* -type f | grep -e '\(cpp\|h\)$' | while read F; do B=$(basename $F); echo $F head -n 1 $F | grep -v $B | wc -l ; done Differential revision: https://reviews.llvm.org/D27115 llvm-svn: 287966
* [CMake] NFC. Updating CMake dependency specificationsChris Bieneman2016-11-181-4/+8
| | | | | | This patch updates a bunch of places where add_dependencies was being explicitly called to add dependencies on intrinsics_gen to instead use the DEPENDS named parameter. This cleanup is needed for a patch I'm working on to add a dependency debugging mode to the build system. llvm-svn: 287408
* Don't allow direct access to StreamString's internal buffer.Zachary Turner2016-11-161-1/+1
| | | | | | | | | | | | | | | This is a large API change that removes the two functions from StreamString that return a std::string& and a const std::string&, and instead provide one function which returns a StringRef. Direct access to the underlying buffer violates the concept of a "stream" which is intended to provide forward only access, and makes porting to llvm::raw_ostream more difficult in the future. Differential Revision: https://reviews.llvm.org/D26698 llvm-svn: 287152
* Make Options::SetOptionValue take a StringRef.Zachary Turner2016-11-121-16/+16
| | | | llvm-svn: 286723
* [RenderScript] Fix reduction argument printingLuke Drummond2016-11-091-0/+4
| | | | | | | | | | | | | | | | When placing function name breakpoints on RenderScript Reduction kernel functions, we were not skipping over the function prologue meaning that inspection of the arguments could be garbled as the function was not finished setting up the stack/registers. In [122fe8f](https://github.com/llvm-mirror/lldb/commit/122fe8f47255ec850155495d10526fccc51f95fb) Aidan added the `SkipPrologue` function that allows us to trivially fix up the kernel's functions' resolved addresses, falling gracefully back to the old behaviour if we don't know how to handle the prologue or can't resolve its size. llvm-svn: 286387
* [Renderscript] Add commands for scriptgroup interaction.Aidan Dodds2016-11-035-4/+610
| | | | | | | | | This commit hooks the nofity function that signals script group compilation. By tracking scriptgroups compiled at runtine, users are able to place breakpoints by script group name. Breakpoints will be placed on the kernels forming the group. llvm-svn: 285902
* Add the ability to set breakpoints on named RenderScript reductionsLuke Drummond2016-10-052-40/+404
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Add new `lldb_private::lldb_renderscript::RSReduceBreakpointResolver` class that can set breakpoints on kernels that are constituent functions of named reduction groups. Also support debugging of subsets of the the reduction group with the `-t, --function-role` flag which takes a comma-separated list of reduction function types outconverter,combiner,initializer,accumulator (defaults to all) - Add 2 new helper methods to `RenderScriptRuntime`, 1. `CreateReductionBreakpoint(name, types)`: instantiates a new RSReduceBreakpointResolver and inserts that resolver into the running process. 2. `PlaceBreakpointOnReduction`: which is a public helper function. - hook up the above functionality to the command-line with new `CommandObject*` classes that handle parsing of function roles and dispatch to the runtime. These are namespaced under the snappy `language renderscript reduction breakpoint ...` subcommand - [incidental] Factor multiple common uses of `FindFirstSymbolWithNameAndType(ConstString(".rs.info")` into static `IsRenderScriptScriptModule(ModuleSP module)` function, and replace original uses. llvm-svn: 283362
* [RenderScript] reflow/reword some comments and normalize namesLuke Drummond2016-10-054-567/+508
| | | | | | | | | | | | Pay more attention to comment alignement (Since _The Great Reformat_ (a015ff50) comments are no longer properly aligned) and variable naming conventions. - Manually reflow and cleanup comments and array literals - Be more economical with our naming conventions - Be internally consistent with regard to local variable/member function naming llvm-svn: 283335
* cleanup RSCoordinate handling and factor out coordinate parserLuke Drummond2016-10-052-128/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This change updates the signature of `RenderScriptRuntime::PlaceBreakpointOnKernel` to take a default RSCoordinate pointer of nullptr. We use this as the predicate value for the breakpoint coordinate rather than trying to fit a sentinel `-1` into a signed version. ``` - void - PlaceBreakpointOnKernel(Stream &strm, const char *name, const std::array<int, 3> coords, Error &error, - lldb::TargetSP target); ``` ``` + bool + PlaceBreakpointOnKernel(lldb::TargetSP target, Stream &messages, const char *name, + const lldb_renderscript::RSCoordinate *coords = nullptr); ``` The above change makes the API for setting breakpoints on kernels cleaner as it returns a failure value rather than modify a sentinel in the caller. The optional arguments are now last and have a default (falsey) value. - RSCoordinate objects are now comparable with operator== and have zero initializers which should make them easier to work on. - Added a `FMT_COORD` macro for use in logging format strings which should make format strings a little less verbose. llvm-svn: 283320
* [CMake] Fixing a few missing dependencies on intrinsics_genChris Bieneman2016-10-031-0/+4
| | | | | | These are missing dependencies that have been exposed in builds as a result of my change to make lldb libraries depend on CLANG_TABLEGEN_TARGETS instead of libclang. llvm-svn: 283081
* Try to fix build errors on Android.Zachary Turner2016-09-221-3/+3
| | | | | | | It doesn't like the implicit conversion from T[] to ArrayRef<T> so I'm using `llvm::makeArrayRef()`. Hopefully I got everything. llvm-svn: 282195
* Convert option tables to ArrayRefs.Zachary Turner2016-09-221-30/+27
| | | | | | | | | | | | | | | | | | | | | | | | | This change is very mechanical. All it does is change the signature of `Options::GetDefinitions()` and `OptionGroup:: GetDefinitions()` to return an `ArrayRef<OptionDefinition>` instead of a `const OptionDefinition *`. In the case of the former, it deletes the sentinel entry from every table, and in the case of the latter, it removes the `GetNumDefinitions()` method from the interface. These are no longer necessary as `ArrayRef` carries its own length. In the former case, iteration was done by using a sentinel entry, so there was no knowledge of length. Because of this the individual option tables were allowed to be defined below the corresponding class (after all, only a pointer was needed). Now, however, the length must be known at compile time to construct the `ArrayRef`, and as a result it is necessary to move every option table before its corresponding class. This results in this CL looking very big, but in terms of substance there is not much here. Differential revision: https://reviews.llvm.org/D24834 llvm-svn: 282188
* Make lldb::Regex use StringRef.Zachary Turner2016-09-211-8/+10
| | | | | | | | | | This updates getters and setters to use StringRef instead of const char *. I tested the build on Linux, Windows, and OSX and saw no build or test failures. I cannot test any BSD or Android variants, however I expect the required changes to be minimal or non-existant. llvm-svn: 282079
* [RenderScript] Support tracking and dumping reduction kernelsLuke Drummond2016-09-162-59/+264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial implementation of support for tracking [RenderScript Reductions](https://developer.android.com/guide/topics/renderscript/compute.html#reduction-in-depth) With this patch, `language renderscript module dump` properly lists reductions that are part of loaded RenderScript modules as well the the consituent functions and their roles, within the reduction. This support required new tracking mechanisms for the `#pragma(reduce)` mechanism, and extension of `RSModuleDescriptor::ParseRSInfo` to support the metadata output by `bcc`. This work was also an opportunity to refactor/improve parse code: - `RSModuleDescriptor::ParseExportReduceCount` now has a complete implementation and the debugger can correctly track reductions on receipt of a module hook. - `RSModuleDescriptor::Dump` now dumps Reductions as well as `ForEach` kernels. Also, fixed indentation of the output, and made indentation groupings in the source clearer. - `RSModuleDescriptor::ParseRSInfo` now returns true if the `".rs.info"` packet has nonzero linecount, rather than rejecting RenderScripts that don't contain kernels (an unlikely situation, but possibly valid). This was changed because scripts that only contained reductions were not being tracked in `RenderScriptRuntime::LoadModule`. - Refactor `RSModuleInfo::ParseRSInfo` and add reduction spec parser stub - Prepared ParseRSInfo to more easily be able to add new parser types - Use llvm::StringRef and llvm::StringMap helpers to make the parsing code cleaner - factor out forEachCount, globalVarCount, and pragmaCount parsing block to their own methods - Add ExportReduceCount Parser - Use `llvm::StringRef` in `RSKernelDescriptor` constructor - removed now superfluous `MAXLINE` macros as we've switched from `const char *` to `llvm::StringRef` llvm-svn: 281717
* Fixing a build breakage caused from a change in LLVM rL281019Dimitar Vlahovski2016-09-091-3/+1
| | | | | | | | | | | | | | Summary: LLVM guys did some clean-up of the Attribute getters/setters and because of that the build was failing. Reviewers: ldrumm Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D24382 llvm-svn: 281030
* *** This commit represents a complete reformatting of the LLDB source codeKate Stone2016-09-066-4411/+4249
| | | | | | | | | | | | | | | | | | | | | | | *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751
* Decoupled Options from CommandInterpreter.Todd Fiala2016-08-111-12/+15
| | | | | | | | | | | | | | | | Options used to store a reference to the CommandInterpreter instance in the base Options class. This made it impossible to parse options independent of a CommandInterpreter. This change removes the reference from the base class. Instead, it modifies the options-parsing-related methods to take an ExecutionContext pointer, which the options may inspect if they need to do so. Closes https://reviews.llvm.org/D23416 Reviewers: clayborg, jingham llvm-svn: 278440
* [RenderScript] Always create a new allocation ID in CaptureAllocationInit hookLuke Drummond2016-08-032-12/+39
| | | | | | | | | | | | | | | | Due to internal reuse of buffers in the RenderScript runtime by the system allocator, comparing pointers is not a safe way to check whether an allocation is tracked by lldb. This change updates the lldb RenderScript internal hook callback to properly identify and remove old allocations that had have an address that is currently being tracked. This change also removes the need for `lldb_private::renderscript::LookupAllocation` to take a `create` flag, as this is now always the case. Original Author: <dean@codeplay.com> Subscribers: lldb-commits llvm-svn: 277613
* Fix an unused variable warning in release builds.Luke Drummond2016-08-031-1/+1
| | | | | | | | | | | | ``num_params`` was unused in RenderScript ABI fixup pass ``cloneToStructRetFnTy`` and was only used in an `assert()` that the number of function parameters for the cloned function was correct. Now we actually use this variable, rather than recomputing it, and avoid the unused variable warning when building without asserts enabled. Subscribers: lldb-commits llvm-svn: 277608
* Add IR fixups for RenderScript ABI mismatch between ARMV7 frontend and x86 ↵Luke Drummond2016-07-287-3/+588
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | backend Expression evaluation for function calls to certain public RenderScript API functions in libRSCPURef can segfault. `slang`, the compiler frontend for RenderScript embeds an ARM specific triple in IR that is shipped in the app, after generating IR that has some assumptions that an ARM device is the target. As the IR is then compiled on a device of unknown (at time the IR was generated at least) architecture, when calling RenderScript API function as part of debugger expressions, we have to perform a fixup pass that removes those assumptions right before the module is sent to be generated by the llvm backend. This issue is caused by multiple problems with the ARMv7-specific assumptions encoded in the LLVM IR. x86 large value returns use a hidden first argument (mapping to llvm::Attribute::StructRet), which can't be picked up by the JIT due to the mismatch between IR generated by the slang frontend and llvm backend. This means that code generated by bcc did not necessarily match the default SysV Linux/Android ABI used by the LLDB JIT - Original Authors: Luke Drummond (@ldrumm), Function declarations fixed by Aidan Dodds (@ADodds) Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D18059 llvm-svn: 276976
* Typo corrections identified by codespellEd Maste2016-07-191-5/+5
| | | | | | | | | Submitted by giffunip@yahoo.com; I fixed a couple of nearby errors and incorrect changes in the patch. llvm.org/pr27634 llvm-svn: 275983
* LLDB help content has accumulated over time without a recent attempt toKate Stone2016-07-141-6/+6
| | | | | | | | | review it for consistency, accuracy, and clarity. These changes attempt to address all of the above while keeping the text relatively terse. <rdar://problem/24868841> llvm-svn: 275485
* second pass over removal of Mutex and ConditionSaleem Abdulrasool2016-05-191-1/+1
| | | | llvm-svn: 270024
* Revert r268591Enrico Granata2016-05-052-13/+6
| | | | | | | | | | | | | | "Allow LanguageRuntimes to return an error if they fail in the course of dynamic type discovery This is not meant to report that a value doesn't have a dynamic type - it is only meant as a mechanism to propagate actual type discovery issues (e.g. malformed type metadata for languages that have such a notion) This information is used by ValueObjectDynamic to set its own m_error, which is a fairly sharp and heavyweight tool to begin with For the time being, this is an architectural improvement but a practical no-op as no existing runtimes are actually setting errors" I need to think about what I want to do in this space more carefully - this attempt might be too heavy of a hammer for the nail I am trying to fix, and I don't want to leave it in while I ponder llvm-svn: 268686
* Allow LanguageRuntimes to return an error if they fail in the course of ↵Enrico Granata2016-05-052-6/+13
| | | | | | | | | | | | dynamic type discovery This is not meant to report that a value doesn't have a dynamic type - it is only meant as a mechanism to propagate actual type discovery issues (e.g. malformed type metadata for languages that have such a notion) This information is used by ValueObjectDynamic to set its own m_error, which is a fairly sharp and heavyweight tool to begin with For the time being, this is an architectural improvement but a practical no-op as no existing runtimes are actually setting errors llvm-svn: 268591
* Get rid of two global constructors by making things static variables in the ↵Greg Clayton2016-03-242-9/+8
| | | | | | only function that uses these variables. llvm-svn: 264347
* [Renderscript] Add stack argument reading code for Mipsel 3Aidan Dodds2016-03-101-7/+7
| | | | | | | | Fix a problem raised with the previous patches being applied in the wrong order. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263134
* [Renderscript] Add stack argument reading code for Mipsel 2Aidan Dodds2016-03-101-2/+9
| | | | | | | | This commit implements the reading of stack spilled function arguments for little endian MIPS targets. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263131
* [Renderscript] Add stack argument reading code for MipselAidan Dodds2016-03-101-6/+17
| | | | | | | | This commit implements the reading of stack spilled function arguments for little endian MIPS targets. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263130
* [Renderscript] Explicitly set the language to evaluate allocationsAidan Dodds2016-03-101-1/+3
| | | | | | | | | | | | | | | | | | | | Currently it is not specified, and since allocations are usually requested once we hit a renderscript breakpoint, the language will be inferred being as renderscript by the ExpressionParser. Actually allocations attempt to invoke functions part of the RS runtime, written in C/C++, so evaluating the calls in RenderScript could be misleading. In particular, in MIPS, the ABI between C/C++ (mips o32) and renderscript (arm) might introduce subtle bugs when evaluating such expressions. This change explicitly sets the language used to evaluate the allocations as C++. Committed on behalf of: Dean De Leo <dean@codeplay.com> llvm-svn: 263129
* Fix all of the unannotated switch cases to annotate the fall through or do ↵Greg Clayton2016-02-261-4/+4
| | | | | | the right thing and break. llvm-svn: 261950
* [Renderscript] Change expression strings to use portable format specifiers.Aidan Dodds2016-02-241-22/+26
| | | | | | Mips64 tests were failing on windows because the sscanf implementation differs between clang/gcc/msvc such that on windows %lx specifies a 32bits parameter and %llx is for 64bits. For us this meant that 64bit pointers were being truncated to 32bits on their way into a JIT'd expression. llvm-svn: 261741
* RenderScript: silence some -Wmissing-brace warningsSaleem Abdulrasool2016-02-231-2/+2
| | | | | | Silence some -Wmissing-brace warnings on Linux with clang 3.7. llvm-svn: 261612
* [Renderscript] Refactor .rs.info parser.Aidan Dodds2016-02-181-52/+66
| | | | | | This patch refactors the .rs.info table parser so that its more in line with the current language runtime code. llvm-svn: 261202
* Silence some clang warningsSaleem Abdulrasool2016-02-151-13/+13
| | | | | | Silences -Wmissing-brace and -Wformat-pedantic warnings from clang on Linux. NFC. llvm-svn: 260914
* [Renderscript] Fix typo in mips64 argument reading code.Aidan Dodds2016-02-111-1/+1
| | | | | | A typo in the mips64 argument reading code would cause register passed arguments to be truncated to 32bits. llvm-svn: 260546
* [Renderscript] Refactor target argument reading code.Aidan Dodds2016-02-112-340/+463
| | | | | | This patch reworks the function argument reading code, allowing us to annotate arguments with their types. The type/size information is needed to correctly parse arguments passed on the stack. llvm-svn: 260525
* [RenderScript] Refactor allocation expressions Ewan Crawford2016-02-101-77/+85
| | | | | | | Patch refractors RS plugin code specifying how format strings are used to JIT the runtime. Author: Dean De Leo <dean@codeplay.com> llvm-svn: 260372
* Fix an issue where certain CommandObjects (or Options thereof) were being ↵Enrico Granata2016-02-061-6/+1
| | | | | | | | | | created once, bound to a specific CommandInterpreter (and hence a specific Debugger), and then cached for reuse across different Debugger instances Obviously, if the original Debugger goes away, those commands are holding on to now stale memory, which has the potential to cause crashes Fixes rdar://24460882 llvm-svn: 259964
* [RenderScript] Add command for recalculating allocation detailsEwan Crawford2016-02-042-0/+61
| | | | | | | | Patch replaces the --refresh flag removed in r258800 with it's own command, 'language renderscript allocation refresh'. Since there is no reason this functionality should be tied to another command as an option. The command itself simply re-JITs all our cached information about allocations. llvm-svn: 259773
OpenPOWER on IntegriCloud