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

525 Коммитов

Автор SHA1 Сообщение Дата
rhadley 64c5d3ae3d Add list of code owners
List of code areas and their owners.  Owners are responsible for ensuring that code is reviewed and are the final word on changes in that area.
2015-04-24 17:28:16 -07:00
Pat Gavlin 003a8ff791 Merge pull request #502 from pgavlin/FixQualification
Fix unqualified (and hence ambiguous) references.
2015-04-23 20:27:35 -07:00
kyulee1 07eb264367 Merge pull request #497 from kyulee1/cmpxchg
Support for interlockedCmpXchg
2015-04-23 17:46:14 -07:00
Pat Gavlin c292737f4d Fix unqualified (and hence ambiguous) references. 2015-04-23 17:04:22 -07:00
Kyungwoo Lee ca0807ce35 Support for interlockedCmpXchg
I use llvm intrinsic to implement this.
I verified code sequence and ran it with a unit test,
which I will add to our test asset later.
2015-04-23 15:36:28 -07:00
Russell C Hadley ef5ebebd32 Merge pull request #482 from russellhadley/SplitOptionsClass
Add Reader required options
2015-04-22 21:39:46 -07:00
rhadley 93b82adac6 Add Reader required options
Adds DoTailCallOpt, TailCallMax as well as others mentiond in the
reader.  Also includes the UseConservativeGC/DoInsertStatepoint
options used by the GC work.
2015-04-22 16:49:33 -07:00
Bengu Li aeed7e864c Merge pull request #488 from libengu/ExcludeInlineTests
Exclude Inline optimization test cases that have issue with LLILC
2015-04-22 15:38:57 -07:00
Russell C Hadley 5075c8aefd Merge pull request #484 from russellhadley/Milestones
Add initial Bring up Milestones markdown.
2015-04-22 14:57:07 -07: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
Joseph Tremoulet 158277621a Merge pull request #486 from JosephTremoulet/MovePointBlocks
Reposition first-pass point blocks
2015-04-22 16:48:29 -04:00
Bengu Li 84eaef7be2 Exclude Inline optimization test cases that have issue with LLILC
39 inlining optimization test cases were added in CoreCLR repo in dotnet/coreclr#776.
3 of them have issue if run with LLILC, Inline_Handler, Inline_Vars, InlineThrow.
Exclude them in both powershell and python scripts. Issue dotnet#487
is created for investigation of the causes.
2015-04-22 13:47:57 -07:00
Joseph Tremoulet 45dc713586 Reposition first-pass point blocks
Point blocks created in the first pass might not yet have a spot for their
point available to insert them into the block list.  This change:
 1. adds tracking of whether the first pass is completed or not,
 2. initializes the NodeOffsetListArray earlier so it will be available
    when point blocks are craeted in readerPrePass,
 2. during the first pass (and pre-pass), updates point block creation to call
    fgAddNodeMSILOffset to ensure that an appropriate spot will be created
    for it in fgReplaceBranchTargets, and
 3. in replaceFlowGraphNodeUses (which gets called from
    fgReplaceBranchTargets), moves the point node to the appropriate spot.

This change also fixes some blocks that are currently out-of-order:
 1. Create endfinally blocks and unreachable continuation blocks as point
    blocks (so the processing above will pick them up)
 2. Add a PreviousNode parameter to makeFlowGraphNode, use it to keep the
    tail block next to the ret block when we process ret.

This gets first-pass created point blocks in correct MSIL offset order
before we process them in the second pass.  The checking in msilToIR is
updated to assert that the blocks are already in sorted order.

Also fix some stale comments around fgReplaceBranchTargets.
2015-04-22 16:46:24 -04:00
Eugene Rozenfeld 5955b02d45 Merge pull request #485 from erozenfeld/getClassTypeFix
Fix llvm assert when calling StructType::setBody from getClassType.
2015-04-22 12:50:14 -07:00
Eugene Rozenfeld 9b0f4ec7ec Fix llvm assert when calling StructType::setBody from getClassType.
It's possible that while adding the fields to a struct we may complete the struct
due to circular type definitions. Detect that case and return the result right away.
2015-04-21 17:18:29 -07:00
Bengu Li d1d9ece652 Merge pull request #481 from libengu/ExcludeTestCMOV
Exclude Directed\cmov test cases that have issues with LLILC
2015-04-21 17:03:35 -07:00
Eugene Rozenfeld ae5d9181f4 Merge pull request #483 from erozenfeld/MDArrayFix
Fix MD array creation.
2015-04-21 17:02:57 -07:00
Eugene Rozenfeld ac88232736 Fix MD array creation.
We had an off-by-1 error in the allocation of the argument array.
Because of that we had an extra null argument in the helper call which
resulted in llvm verification failure when building Roslyn.
2015-04-21 15:16:56 -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
Bengu Li 450e7575d5 Exclude Directed\cmov test cases that have issues with LLILC
16 test cases were added under Directed\cmov in CoreCLR repo in dotnet/coreclr#766.
13 of them have issues if run with LLILC. Exclude them
in both powershell and python scripts. Issue #480
is created for investigation of the causes.
2015-04-21 12:00:32 -07:00
Eugene Rozenfeld 2f64cd5990 Merge pull request #475 from erozenfeld/PointerMerge
Handle merging of nativeint and unmanaged pointers as PHI operand types.
2015-04-20 20:00:33 -07:00
Eugene Rozenfeld 4f6c955d5e Handle merging of nativeint and unmanaged pointers as PHI operand types.
We hit these cases in IL stubs in Roslyn bring-up.
2015-04-20 17:04:13 -07:00
Richard L Ford 2ad3639ae1 Merge pull request #460 from richardlford/driverconfig
Correct main CMakeLists.txt file for standalone executables.
2015-04-20 13:33:58 -07:00
Richard L. Ford 88dd628bac Correct main CMakeLists.txt file for standalone executables.
When configuring standalone LLILC (i.e. when the LLILC repo
is not placed in LLVM/tools), we were not setting
LLVM_RUNTIME_OUTPUT_INTDIR and LLVM_LIBRARY_OUTPUT_INTDIR.
These must be set if an executable is added.

While testing I also added a dummy (placeholder) driver to verify that
it is compiled and executable created for it. However we will wait to
check in a driver until it is actually functional.
2015-04-20 13:29:43 -07:00
Andy Ayers 348ce648be Merge pull request #464 from AndyAyersMS/sqrt
Implement the sqrt intrinsic
2015-04-20 13:02:34 -07:00
Andy Ayers f8771e9082 Implement the sqrt intrinsic
Lower this to LLVM's sqrt intrinsic, which on x64 turns into an SSE2 sqrt instruction.
2015-04-20 12:58:57 -07:00
Bengu Li f25d5a74f1 Merge pull request #463 from libengu/ExcludeJITCSETests
Exclude JIT CSE test cases that has issue with LLILC
2015-04-19 08:51:09 -07:00
Bengu Li 757e32ffbb Exclude JIT CSE test cases that has issue with LLILC
25 JIT CSE test cases were added in CoreCLR repo in https://github.com/dotnet/coreclr/pull/738.
12 of them have issues if run with LLILC. Exclude them
in both powershell and python scripts. Issue https://github.com/dotnet/llilc/issues/462
is created for investigation of the causes.
2015-04-18 18:03:14 -07:00
Eugene Rozenfeld dbd11eda17 Merge pull request #461 from erozenfeld/loadNonPrimitiveObj1
Implement loadNonPrimitiveObj.
2015-04-17 23:49:48 -07:00
Joseph Tremoulet 9e41e75f8b Merge pull request #457 from JosephTremoulet/MakeCall
Add makeCall wrapper
2015-04-18 00:20:17 -04:00
Eugene Rozenfeld fa4aee12ba Implement loadNonPrimitiveObj.
Since we allow structs in SSA, the code is similar to that for loading
primitive types.

Change getPrimitiveAddress to getTypedAddress so that it can be used for
both primitive and non-primitive types.
2015-04-17 20:03:01 -07:00
Joseph Tremoulet 9369fba917 Add makeCall wrapper
This wraps LLVMBuilder->CreateCall, and will be where the logic goes that
instead creates an invoke with an appropriate exception edge if we're in a
protected region.
2015-04-17 18:44:42 -07:00
Andy Ayers b60b5bf718 Merge pull request #417 from AndyAyersMS/Localloc
Implement support for localloc.
2015-04-17 18:34:31 -07:00
Eugene Rozenfeld 1f1bdd6dcb Merge pull request #458 from erozenfeld/SynchMethods
Support for synchronized methods.
2015-04-17 16:56:08 -07:00
Bengu Li 8a66b4f339 Merge pull request #452 from libengu/CheckPass
Add llilc_checkpass Python Script.
2015-04-17 14:46:27 -07:00
Bengu Li a42e9abbf1 Add llilc_checkpass Python Script
llilc_checkpass compares two test results, no matter summary or verbose,
and checks if any function was successfully jitted by LLILC in base result
but failed jitting in diff result.

If the check passed, the script return 0. In case of 0, it might have
jitted more functions in diff result than in base result. The two results
are not necessary the same in this case. Counting result is reported.

If the check failed due to newly failed function, return 1.

If the check failed due to unexpected reason, return negative numbers.

usage: llilc_checkpass.py [-h] -b BASE_RESULT_PATH -d DIFF_RESULT_PATH

optional arguments:
  -h, --help            show this help message and exit

required arguments:
  -b BASE_RESULT_PATH, --base-result-path BASE_RESULT_PATH
                        full path to base result
  -d DIFF_RESULT_PATH, --diff-result-path DIFF_RESULT_PATH
                        full path to diff result

Also this change includes some supporting changes in llilc_runtest
and applyfilter:
1. In llilc_runtest result normalization, perform a summary extraction on
   verbose result and a renaming on summary result.
2. applyfilter is enhanced with summary extraction so that filtering
   and summary extraction can be done at the same time without the
   need to scan through result file twice.
3. Summary result renaming added in applyfilter
4. Introduce const module in for symbolic constatn return code
5. Default to single quote style. Python is a little tricky when double
   quotes and single quotes are mixed.
6. Create required argument section in help for llilc_runtest and llilc_checkpass
7. Add more error and exception handling
8. Remove llvm verification failure from summary
2015-04-17 14:40:03 -07:00
Eugene Rozenfeld ac3078375b Support for synchronized methods.
Add calls to MONITOR_ENTER on entry to the method and MONITOR_EXIT on returns.

We can't catch exceptions yet; when we can we will need to add a try/fault for the entire method
so that we can call MONITOR_EXIT on unhandled exceptions.

We have a synchronized method in HelloWorld (System.IO.TextWriter+SyncTextWriter.WriteLine).
I verified that the generated IR looks correct. I also tested with a simple two-thread race that the
behavior of synchronized instance and static methods is as expected.
2015-04-17 14:39:03 -07:00
Andy Ayers 089a03b09e Implement basic support for localloc.
Getting the LLVM IR right here is not too hard. We're zeroing via the JIT helper since using LLVM's memset might lead to calls into the CRT.

Most of the challenge here is getting this IR properly lowered to machine code. I have some preliminary changes checked into LLVM for this already, and this change depends upon them.

To enable those changes we now use the CoreCLR environment when targeting windows. Thus the LLVM triple we use on windows is now actually a quad.

The LLVM work is incomplete so this only works at runtime if the localloc is small enough to stay within the guard page, but it handles all our simple test cases.
2015-04-17 13:52:03 -07:00
Pat Gavlin 44f164ca2e Merge pull request #449 from pgavlin/CompileWarnings
Fix a number of warnings from clang.
2015-04-17 09:09:12 -07:00
kyulee1 fa36f39df0 Merge pull request #455 from kyulee1/fixnamespace
Fix for using namespace llvm inside header file
2015-04-17 06:16:23 -07:00
Swaroop Sridhar 803c0f695f Merge pull request #451 from swaroop-sridhar/option
Separate options for ConservativeGC and Inserting Safepoints
2015-04-16 23:43:36 -07:00
Kyungwoo Lee 1a5adc4f94 Fix for using namespace llvm inside header file
When including the header file for other purpose,
this often caused ambiguous name conflicts for other types.
By convention, I moved it to cpp file where it is used.
2015-04-16 22:20:40 -07:00
Eugene Rozenfeld abb614c73b Merge pull request #454 from erozenfeld/FixesForRoslyn
Fix and workarounds for Roslyn.
2015-04-16 20:27:42 -07:00
Andy Ayers 5e9e22859e Merge pull request #453 from AndyAyersMS/NoSymbolSearch
Disable symbol searching.
2015-04-16 18:50:28 -07:00
Joseph Tremoulet 4259af9c73 Merge pull request #450 from JosephTremoulet/NoPropPreds
Allow blocks to have zero stack-propagating preds
2015-04-16 20:24:58 -04:00
Swaroop Sridhar 2bc3448cae Separate options for ConservativeGC and Inserting Safepoints
CoreCLR's COMPLUS_GCCONSERVATIVE flag tells the runtime to use
conservative when set. LLILC also used this flag to determine whether
the insertion and lowering of statepoint intrinsics are done.

With this change, steatpoints are inserted if the COMPLUS_INSERTSTATEPOINTS
switch is set, regardless of the COMPLUS_GCCONSERVATIVE flag.
This allows testing of LLILC Jit with statepoints inserted. That is, to
check that the code itself is still correct, regardless of the GC information.
2015-04-16 17:10:33 -07:00
Eugene Rozenfeld b86c667212 Fix and workarounds for Roslyn.
Fix a check in GenIR::simpleFieldAddress that was allowing bad field indices for StructGEP.

Add NYIs for struct type mismatches.

Treat verification errors as compilation failures.
2015-04-16 17:03:37 -07:00
Andy Ayers 586906566e Disable symbol searching.
We don't want the LLVM dynamic loader to try and resolve external symbols by name. As things stand today, if jitted code contains external symbol references we have a bug in the jit.

This anticipates a change I'm about to make in LLVM where I enable the ability to resolve externals by name for x64 COFF RtDyld, since other LLVM clients need this.

Once both changes are in we'll get a somewhat clearer error message when Jitted code has an unsat, e.g.

`LLVM ERROR: Program used external function '__chkstk' which could not be resolved!`
2015-04-16 16:52:37 -07:00
Joseph Tremoulet 6cce44d449 Merge pull request #447 from JosephTremoulet/UpdateEhDoc
Remove `beginfinally` intrinsic from EH plans
2015-04-16 18:50:41 -04:00
Joseph Tremoulet 96960356ae Merge pull request #448 from JosephTremoulet/PyCache
Add __pycache__ to .gitignore
2015-04-16 18:49:47 -04:00