Граф коммитов

73 Коммитов

Автор SHA1 Сообщение Дата
Günther Foidl dd0fa8c55e Fixed formatting in documentation
Some spacing where incorrect, thus markdown was rendered the wrong way.
2018-05-05 12:50:43 +02:00
Simon Nattress 292e21a9f3 Add MachO S_MOD_INIT_FUNC_POINTERS section type support
Global data initialization is provided by special section types in the
MachO format whose contents are a list of function pointers to
initialize. Add ObjWriter support for these sections through the
existing CustomSectionAttributes enum.
2016-04-06 19:21:48 -07:00
Andy Ayers 91b3fad309 We don't need to chcp anymore
The issue in CoreFX that lead to us needing to run tests in code page 65001 is long since fixed. So remove the chcp from our test scripts and docs.

Closes #12.
2015-11-20 14:40:58 -08:00
Swaroop Sridhar 2cd3c8d4d5 Update Precise GC Test Pass status 2015-10-28 12:28:39 -07:00
Swaroop Sridhar b610e551fd GC Doc: Update implementation status 2015-10-20 14:26:58 -07:00
Andy Ayers f963696fb8 Fix some typos and update the gc struct section to reflect the new plan 2015-10-19 13:14:34 -07:00
Andy Ayers e60acdbe76 LLILC at Six Months: A Retrospective
This writeup gives my perspective on the LLILC accomplishments made over the past six months and the challenges that remain.
2015-10-15 09:19:32 -07:00
Joseph Tremoulet 7b345cd998 Specify optimized tablegen in docs
Add `-DLLVM_OPTIMIZED_TABLEGEN=ON` to the `cmake` command lines in various
docs, as this provides a very significant improvement to build times.
2015-09-07 15:17:05 -04:00
Swaroop Sridhar ecd5d15fbd Update llilc-gc.md
Update Staging plan status
2015-08-31 13:46:27 -07:00
Richard L Ford 95ac44d2d9 Additional LLILC debugging aids
The changes makes the following improvements to the
LLILC debugging facilities:

1. A make_sln.py script is added which can be used to create
a Visual Studio 2015 solution that can be used to debug
a managed application using LLILC. Optionally the
script can invoke Visual Studio on the created solution.
The handles setting up all the required environment
variables for making LLILC the alternate JIT.

2. A --windbg-and-args option was added to the
llilc_run.py script to enable debugging the
application being run using windbg.

3. In order to ensure that empty values for
LLILC configuration variables are equivalent to
unspecified environment variables, the
code that LLILC uses to check some configuration
variables was refactored to require that
the feature is only enabled if the variable
is both non-null and non-empty.

4. The Debugging.md documentation was updated
to describe these features.

5. The llilc_run.py and make_sln.py were modified so they
run successfully on either Python 2.7 or Python 3.4.
2015-08-19 11:52:47 -07:00
Michelle McDaniel 51e23b488e Merge pull request #757 from adiaaida/formatdoc
Add links to Contributing Guide for formatters
2015-08-13 09:11:11 -07:00
Michelle McDaniel 7ecc256802 Add links to Contributing Guide for formatters
This change adds links to Contributing.md to the more up-to-date
versions of clang-format and clang-tidy
2015-08-13 09:07:30 -07:00
Swaroop Sridhar 86220c0424 Update GC Staging plan
Include work necessary to enable Precise-GC in optimize LLILC builds.
2015-08-10 17:21:54 -07:00
Kerem bcac0f799d Areas-To-Contribute issue ranges expanded. 2015-07-31 18:29:58 +03:00
Swaroop Sridhar a571a2312b Update Code-Formatting.md
Add two missing \\s in a path.
2015-07-30 17:03:07 -07:00
Swaroop Sridhar 3947050fb9 Update Code-Formatting.md 2015-07-28 12:29:41 -07:00
Swaroop Sridhar 5eab12d656 Update Code Formatting Documentation
Update the documentation to reflect the fact that we now run both clang-format and clang-tidy checks by default.
2015-07-24 19:23:49 -07:00
Richard L Ford bb7585399a Add new debugging facilities to LLILC.
Modify LLILC options processing by adding the
following options:

* COMPlus_ALtJitExclude is a MethodSet. LLILC will only
  attempt to compile methods which are in the COMPlus_AltJit
  set, but not in the COMPlus_ALtJitExclude set.
* COMPlus_ALtJitBreakAtJitStart is a MethodSet. This is used
  when running LLILC under the control of a debugger.
  It causes a "break" message to be written for
  matching methods when the method is about to be
  jitted. The method is written from the
  LLILCJit::compileMethod method in file
  llilc\lib\Jit\LLILCJit.cpp. The user must put
  a breakpoint on the statement the write
  out the message in order to actually get a
  break.
* COMPlus_ALtJitMSILDump is a MethodSet. The MSIL for
  methods in the set is dumped before JITTING the
  method.
* COMPlus_ALtJitLLVMDump is a MethodSet. The LLVM IR for
  methods in the set is dumped just after LLILC has
  finished reading the MSIL and converting it to LLVM IR.
* COMPlus_ALtJitCodeRangeDump is a MethodSet. For methods
  in the set, the starting and ending address of the method's
  code, and the code size, is printed after the method has
  been JITTED. This can be useful in identifying which
  method contains a given address.

In addition:

1. Delete LLILCJitContext::outputDebugMethodName and
   LLILCJitContext::outputSkippingMethodName and replace
   with simpler output using Context.MethodName.
2. ReaderBase::printMSIL(uint8_t, uint32_t, uint32_t) is made
   static so it can be called from outside ReaderBase.
   When it calls parseILOpcode, it passes nullptr as the
   Reader parameter.
3. parseILOpcode was modified so that if its Reader parameter
   is null, it uses dbPrint for error messages rather than
   terminating with a fatal error. This is friendlier as
   this only happens when called from printMSIL and we would
   like printMSIL to be robust as it is called from the
   debugger.

4. Provide printMSIL facility even for release mode.
   This fixes a build error for release mode.
   ReaderBase::printMSIL was being called but not being
   defined in release mode. I believe, at least during
   this bring-up period, that we want this facility
   even for release mode, so I removed some conditional
   compilation directives so that dumping of MSIL is
   available in any mode.

5. Added Documentation/Debugging.md file to
   document how to debug LLILC. More will be added to
   this file, but we have already added documentation
   of the environment variables used by LLILC
   (but not yet those used when LLILC is NGENing).
2015-07-24 11:22:29 -07:00
rhadley 5337efabb8 Update milstones to reflect new status.
Mark Hello World, and Roslyn Hello World as complete for Windows and Linux. Also add new milestones for Roslyn selfhosted.
2015-07-09 15:34:00 -07:00
Swaroop Sridhar b62afb3434 Update GC Staging status
Updated the status, since #31 is complete.
Also noted #696 for importing gc-tests.
2015-07-08 13:20:49 -07:00
unknown 500c3f4697 Update to the Windows Getting Started Guide.
Added an instruction to install Visual Studio Update 4
2015-07-07 16:28:29 -07:00
Pat Gavlin 5baebb1b7e Merge pull request #677 from pgavlin/DocumentUnmanagedCalls
Document the GC transition design.
2015-07-02 07:44:29 -07:00
Pat Gavlin 8a9105583b Document the GC transition design.
This updates the GC document to conform with LLVM terminology for GC
transitions and adds a document describing how such transitions are
supported for CoreCLR in LLILC and LLVM.
2015-07-02 07:43:56 -07:00
Joseph Tremoulet 700a2efe7b Move wiki contents to Documentation directory
Bulk move with minimal editing (just wrapping lines and fixing up links)
to get our documentation in a place where changes can be made via pull
request and it will be versioned with the code.

Resolves #612.
Resolves #622.
2015-07-01 12:10:48 -04:00
Swaroop Sridhar 88e8529eb2 GC Staging Plan: Update Work items
Add work item references for Test-Pass step.
2015-06-26 16:41:03 -07:00
Eugene Rozenfeld 7ece115feb Update reader document.
Update implemented instructions, future work. Add a small section on ngen.
2015-06-19 18:05:32 -07:00
Swaroop Sridhar 61d8ec8f5b Add a section on GCTables
Add a sub-section about implementing the GC-Tables in LLILC.
2015-06-12 21:08:48 -07:00
Swaroop Sridhar cfa2f94d4b Staging plan: Reword a work item
Clarify the work involved in Step 8 of staging plan.
2015-06-10 14:33:24 -07:00
Joseph Tremoulet 35f4e4bfba Update EH doc to reflect new WinEH proposal
The plan is to build on the model proposed in
http://thread.gmane.org/gmane.comp.compilers.llvm.devel/85783 - in
particular, EH edges will no longer target `landingpad`, but rather will
target `catchblock`/`cleanupblock` instructions that can guarantee
preserving the structure of dispatch code (which ultimately will be
perfomed by the runtime) during optimization.
2015-06-08 12:08:04 -04:00
Joseph Tremoulet 47513add13 Switch to ORC jit infrastructure
This will simplify some aspects of funclet management, and also gets LLILC
on top of the newer jitting framework that active development is focused
on.

ORC jits are created by composing `layers`.  LLILC's functionality is
covered by two "off-the-shelf" layers: the IRCompileLayer (using the
SimpleComplier utility) for compiling IR to machine code, and the
ObjectLinkingLayer for resolving fixups and relocations and interfacing
with the EEMemoryManager to load the machine code into appropriate memory.

Closes #610
2015-06-03 16:57:36 -04:00
Swaroop Sridhar 1642d97a2c Update Status of GC-support implementation
Noted that Issue #32 is completed.
2015-05-12 13:37:22 -07:00
Swaroop Sridhar 2b25450d62 Update GC support status
Noted that #30 is complete
2015-05-11 19:36:54 -07:00
Eugene Rozenfeld 3ab7ca7f6a Implement multidimensional array access intrinsics.
Implement arrayGet, arraySet, and arrayAddress to expand 2D and 3D
array accesses inline; allow runtime helper to do the expansions
for arrays of other dimensions.

Fix getTypedAddress to deal with ldind.ref with a nativeint arg.
(This was a new test failure after unblocking methods with md array
accesses).

Remove NYI for intrinsics in GenIR::genCall since only a fixed set
of intrinsics is expected to be expanded there; the rest should be
turned into runtime helper calls. Note that ReaderBase::rdrCall also
looks at intrinsics.

Add printMSIL() to dump msil for the current method.
2015-05-10 17:52:29 -07:00
Joseph Tremoulet 8af25e679a Update EH document
- Update section on implicit null checks wrt the null check folding RFC.

- Mark reader catch support in EH branch implemented.  This was added in
  e2bba9a
2015-05-04 16:58:38 -04:00
rhadley 0514581ace Add initial Bring up Milestones markdown.
This adds a place for us to keep milestones that will take a PR.
These milestones will be linked to out of the wiki for reference. For
additions open a github issue to start a conversation then PR an edit
that has the new milestone.  When milestones are acheived strike through the txt.
2015-04-22 14:36:34 -07:00
Swaroop Sridhar 0722cd7b34 Add GC Support Staging Plan
Add implementation staging plan and status section to the GC-support documentation.
2015-04-21 14:03:14 -07:00
Joseph Tremoulet c56f3703f6 Remove `beginfinally` intrinsic from EH plans
The LLVM plan is actually that filter invocations must be included in the
possible side-effects of calls that may throw exceptions.  That plan
should work for LLILC as well.
2015-04-16 15:47:59 -04:00
mewmew 4881807a07 Improve documentation, as described below.
* Fix broken fragment identifiers.
* Use relative links when possible.
* Remove unused {#mainpage} from index.md
* Use consistent formatting for subheaders; e.g.

Use:
   ## Subheader

Instead of:
   Subheader
   ----------
2015-04-14 12:30:49 +02:00
rhadley 9a965f5bc2 Updated architecture diagrams
As part of the building up the announcement materials I updated the documents.  So adding them to the checked in docs.
2015-04-13 13:08:11 -07:00
Eugene Rozenfeld 72d20e97a7 Process the flow graph in the order of MSIL offsets.
This is necessary to compute PHI types before processing their blocks.
ECMA-335 guarantees empty operand stacks on MSIL offset back edges.

Update the reader document.

Remove tail block if it's unreached.

This fixes all current verification errors in Roslyn build.
2015-04-09 21:30:55 -07:00
Eugene Rozenfeld f252ee8842 Handle mismatching types when merging operand stacks.
When merging operand stacks the types of the corresponding values may be
different. The CLI spec allows merging of nativeint and int32 (resulting in nativeint),
float and double (resulting in double), and GC pointers (resulting in the closest
common supertype).

In order to be able to use JitInfo->mergeClasses (that handles finding closest common
supertype) we need to be able to map back from llvm types to class handles. I added
ReverseClassTypeMap for that.

Since our processing of basic blocks depends on the types of values on the stack we
need to complete stack merging and finalize PHI instructions before processing
join blocks. To do that I changes the order of flow graph processing from depth-first
preorder to reverse postorder.

Closes #373.
2015-04-03 10:20:34 -07:00
Joseph Tremoulet 3b3d6ff7a0 Insert divide-by-zero checks
Generate an explicit compare+branch+conditional-throw before each integer
divide.

Add a mock configuration flag UseExplicitZeroDivideChecks alongside
UseExplicitNullChecks to facilitate future experiments on what code
size/shape would look like with checks implicit in divide operations.

Closes #64
2015-03-26 16:22:07 -04:00
Joseph Tremoulet 43a1787fc3 Implement .ovf forms of conv instruction
For integer cases, add explicit inline tests immediately prior to
conversion that branch to a block that throws OverflowException if the
source is out-of-bounds.
For floating-point cases, invoke the appropriate runtime helper (with
possibly an up-conversion from float to double first and possibly an
integer narrowing after).

Resolves #48
2015-03-26 14:01:57 -04:00
Eugene Rozenfeld fd8d3f97cd Document describing llilc reader.
Closes #224.
2015-03-25 14:44:59 -07:00
Joseph Tremoulet eceeaa188c Implement overflow forms of binary arithmetic
Map these to the appropriate LLVM intrinsics that detect overflow and
compute results together.
Also annotate the invalid type/opcode combinations in the operator map
(floats don't have bitwise operations or unsigned or overflow variants).

Closes #65
2015-03-23 16:26:07 -04:00
Joseph Tremoulet 3545637a57 Mark array bound/type checks completed
These were implemented in 63a2f1f and 2e1f163.
2015-03-23 16:10:31 -04:00
Joseph Tremoulet 5f6af8ff2a Implement finally continuation selection for leave
For each finally, generate a continuation selector variable, and end the
finally with a switch that jumps to a continuation based on the selector.

For each leave instruction, set the selector variables appropriately for
each finally handler being exited before jumping to the innermost finally.

These explicit sequences match what Clang generates for gotos across
cleanups and what the WinEHPrepare funclet extractor will expect to see.

The 'default' case for each switch targets a block with just an
Unreachable in it (again following Clang's example).

The instructions to set the selector variables are generated and inserted
in the IR during first-pass flow-graph building.  I've added a map to the
reader objects tracking where selector stores have been inserted at which
MSIL offsets, updated fgNodeGetEndInsertIRNode to consult the map, and
updated a few places that were manually grabbing a block's terminator to
instead call fgNodeGetEndInsertIRNode, so that 2nd pass IR insertion can
use the correct insertion point when it adds IR to these blocks.
The switch instruction itself (and selector load feeding it) is generated
when processing the first leave across a particular finally, and inserted
when processing the first endfinally for that finally.  Since a finally
region can have an arbitrary number of endfinally instructions, endfinally
becomes a branch that targets a block that holds the switch, so that all
endfinally instructions for a given finally can branch to the shared
switch.

Resolves #260
2015-03-20 22:26:41 -04:00
Mukul Sabharwal 1961f6edcf Merge pull request #314 from mjsabby/master
Make interior/vs exterior pointer doc clearer
2015-03-16 18:14:05 -07:00
rhadley f6332f37f7 Updates for grammar/punctuation.
Incorporate feed back from Rich to clean up some issues.
2015-03-16 14:40:41 -07:00
rhadley c8b2c63e00 Add managed language semantics section
Talks about managed language optimizations, GC statepoint insertion, and
particular CLR exceptions.
2015-03-16 12:50:50 -07:00