From sabre at nondot.org Mon Oct 26 00:01:09 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 00:01:09 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/2009-03-ACMSE-Superpage.html
2009-03-ACMSE-Superpage.pdf pubs.js
Message-ID: <200910260501.n9Q5197x003334@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
2009-03-ACMSE-Superpage.html added (r1.1)
2009-03-ACMSE-Superpage.pdf added (r1.1)
pubs.js updated: 1.51 -> 1.52
---
Log message:
add another paper
---
Diffs of the changes: (+56 -0)
2009-03-ACMSE-Superpage.html | 49 +++++++++++++++++++++++++++++++++++++++++++
2009-03-ACMSE-Superpage.pdf | 0
pubs.js | 7 ++++++
3 files changed, 56 insertions(+)
Index: llvm-www/pubs/2009-03-ACMSE-Superpage.html
diff -c /dev/null llvm-www/pubs/2009-03-ACMSE-Superpage.html:1.1
*** /dev/null Mon Oct 26 00:01:04 2009
--- llvm-www/pubs/2009-03-ACMSE-Superpage.html Mon Oct 26 00:00:54 2009
***************
*** 0 ****
--- 1,49 ----
+
+
+
+
+
+ A Case for Compiler-driven Superpage Allocation
+
+
+
+
+ A Case for Compiler-driven Superpage Allocation
+
+
+ Joshua Magee and Apan Qasem
+
+
+
Abstract:
+
+ Most modern microprocessor-based systems provide support for superpages both at the hardware and software level. Judicious use of superpages can significantly cut down the number of TLB misses and improve overall system performance. However, indiscriminate superpage allocation results in page fragmentation and increased application footprint, which often outweigh the benefits of reduced TLB misses. Previous research has explored policies for smart allocation of superpages from an operating systems perspective. This paper presents a compiler-based strategy for automatic and profitable memory allocation via superpages. A significant advantage of a compiler-based approach is the availability of data-reuse information within an application. Our strategy employs data-locality analysis to estimate the TLB demands of a program and uses this metric to determine if the program will benefit from superpage allocation. Apart from its obvious utility in improving TLB performance, this !
strategy can be used to improve the effectiveness of certain data-layout transformations and can be a useful tool in benchmarking and empirical tuning. We demonstrate the effectiveness of this strategy with experiments on an Intel Core 2 Duo with a two-level TLB.
+
+
+
Published:
+
+ "A Case for Compiler-driven Superpage Allocation"
+
+ Joshua Magee and Apan Qasem.
+
+
+ Proceedings of the 47th ACM Southeast Regional Conference (ACMSE09)
+ , Mar 2009.
+
+
+
+
+
+
+
+
+
+
Index: llvm-www/pubs/2009-03-ACMSE-Superpage.pdf
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.51 llvm-www/pubs/pubs.js:1.52
--- llvm-www/pubs/pubs.js:1.51 Sun Oct 25 23:51:40 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 00:00:54 2009
@@ -110,6 +110,13 @@
month: 3,
year: 2009},
+ {url: '2009-03-ACMSE-Superpage.html',
+ title: 'A Case for Compiler-driven Superpage Allocation',
+ author: 'Joshua Magee and Apan Qasem',
+ published: "Proc. of the 47th ACM Southeast Regional Conference (ACMSE09)",
+ month: 3,
+ year: 2009},
+
{url: '2009-02-PPoPP-MappingParallelism.html',
title: 'Mapping parallelism to multi-cores: a machine learning based approach',
author: "Zheng Wang and Michael F.P. O'Boyle",
From sabre at nondot.org Mon Oct 26 00:18:55 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 00:18:55 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/2009-07-ISSTA-BegBunch.html
2009-07-ISSTA-BegBunch.pdf pubs.js
Message-ID: <200910260518.n9Q5It9k004044@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
2009-07-ISSTA-BegBunch.html added (r1.1)
2009-07-ISSTA-BegBunch.pdf added (r1.1)
pubs.js updated: 1.52 -> 1.53
---
Log message:
add BegBunch: benchmarking for C bug detection tools
---
Diffs of the changes: (+76 -0)
2009-07-ISSTA-BegBunch.html | 68 ++++++++++++++++++++++++++++++++++++++++++++
2009-07-ISSTA-BegBunch.pdf | 0
pubs.js | 8 +++++
3 files changed, 76 insertions(+)
Index: llvm-www/pubs/2009-07-ISSTA-BegBunch.html
diff -c /dev/null llvm-www/pubs/2009-07-ISSTA-BegBunch.html:1.1
*** /dev/null Mon Oct 26 00:18:49 2009
--- llvm-www/pubs/2009-07-ISSTA-BegBunch.html Mon Oct 26 00:18:39 2009
***************
*** 0 ****
--- 1,68 ----
+
+
+
+
+
+ BegBunch: benchmarking for C bug detection tools
+
+
+
+
+ BegBunch: benchmarking for C bug detection tools
+
+
+ Cristina Cifuentes, Christian Hoermann, Nathan Keynes, Lian Li, Simon Long, Erica Mealy, Michael Mounteney, Bernhard Scholz
+
+
+
Abstract:
+
+ Benchmarks for bug detection tools are still in their infancy. Though in recent years various tools and techniques were introduced, little effort has been spent on creating a benchmark suite and a harness for a consistent quantitative and qualitative performance measurement. For assessing the performance of a bug detection tool and determining which tool is better than another for the type of code to be looked at, the following questions arise: 1) how many bugs are correctly found, 2) what is the tool's average false positive rate, 3) how many bugs are missed by the tool altogether, and 4) does the tool scale.
+
+ In this paper we present our contribution to the C bug detection community: two benchmark suites that allow developers and users to evaluate accuracy and scalability of a given tool. The two suites contain buggy, mature open source code; bugs are representative of "real world" bugs. A harness accompanies each benchmark suite to compute automatically qualitative and quantitative performance of a bug detection tool.
+
+ BegBunch has been tested to run on the Solaris, Mac OS X and Linux operating systems. We show the generality of the harness by evaluating it with our own Parfait and three publicly available bug detection tools developed by others.
+
+
+
Published:
+
+ "BegBunch: benchmarking for C bug detection tools"
+
+ Cristina Cifuentes, Christian Hoermann, Nathan Keynes, Lian Li, Simon Long, Erica Mealy, Michael Mounteney, Bernhard Scholz.
+
+
+ Proceedings of the 2nd International Workshop on Defects in Large Software Systems: Held in conjunction with the ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2009)
+ , Chicago, Illinois, July 2009.
+
+ @inproceedings{1555866,
+ author = {Cifuentes, Cristina and Hoermann, Christian and Keynes, Nathan and Li, Lian and Long, Simon and Mealy, Erica and Mounteney, Michael and Scholz, Bernhard},
+ title = {BegBunch: benchmarking for C bug detection tools},
+ booktitle = {DEFECTS '09: Proceedings of the 2nd International Workshop on Defects in Large Software Systems},
+ year = {2009},
+ isbn = {978-1-60558-654-0},
+ pages = {16--20},
+ location = {Chicago, Illinois},
+ doi = {http://doi.acm.org/10.1145/1555860.1555866},
+ publisher = {ACM},
+ address = {New York, NY, USA},
+ }
+
+
+
+
+
+
+
+
+
Index: llvm-www/pubs/2009-07-ISSTA-BegBunch.pdf
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.52 llvm-www/pubs/pubs.js:1.53
--- llvm-www/pubs/pubs.js:1.52 Mon Oct 26 00:00:54 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 00:18:39 2009
@@ -9,6 +9,14 @@
month: 8,
year: 2009},
+ {url: '2009-07-ISSTA-BegBunch.html',
+ title: 'BegBunch: benchmarking for C bug detection tools',
+ author: 'Cristina Cifuentes, Christian Hoermann, Nathan Keynes, Lian Li, Simon Long, Erica Mealy, Michael Mounteney, and Bernhard Scholz',
+ published: 'Proc. of the 2nd International Workshop on Defects in Large Software Systems: Held in conjunction with the ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2009)',
+ location: 'Chicago, Illinois',
+ month: 7,
+ year: 2009},
+
{url: '2009-06-PLDI-LibraryBindings.html',
title: 'Automatic generation of library bindings using static analysis',
author: 'Tristan Ravitch, Steve Jackson, Eric Aderhold, and Ben Liblit',
From sabre at nondot.org Mon Oct 26 00:45:31 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 00:45:31 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/2009-08-SAS-IPSSA.html
2009-08-SAS-IPSSA.pdf pubs.js
Message-ID: <200910260545.n9Q5jVQ3005012@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
2009-08-SAS-IPSSA.html added (r1.1)
2009-08-SAS-IPSSA.pdf added (r1.1)
pubs.js updated: 1.53 -> 1.54
---
Log message:
add another paper and add a bunch that I can't find pdf's for.
---
Diffs of the changes: (+90 -0)
2009-08-SAS-IPSSA.html | 50 +++++++++++++++++++++++++++++++++++++++++++++++++
2009-08-SAS-IPSSA.pdf | 0
pubs.js | 40 +++++++++++++++++++++++++++++++++++++++
3 files changed, 90 insertions(+)
Index: llvm-www/pubs/2009-08-SAS-IPSSA.html
diff -c /dev/null llvm-www/pubs/2009-08-SAS-IPSSA.html:1.1
*** /dev/null Mon Oct 26 00:44:51 2009
--- llvm-www/pubs/2009-08-SAS-IPSSA.html Mon Oct 26 00:44:40 2009
***************
*** 0 ****
--- 1,50 ----
+
+
+
+
+
+ Increasing the scope and resolution of Interprocedural Static Single Assignment
+
+
+
+
+ Increasing the scope and resolution of Interprocedural Static Single Assignment
+
+
+ Silvian Calman and Jianwen Zhu
+
+
+
Abstract:
+
+ While intraprocedural Static Single Assignment (SSA) is ubiquitous in modern compilers, the use of interprocedural SSA, although seemingly a natural extension, is limited. We find that part of the impediment is due to the narrow scope of variables handled by previously reported approaches, leading to limited benefits in optimization.
+
+ In this study, we increase the scope of Interprocedural SSA (ISSA) to record elements and singleton heap variables. We show that ISSA scales reasonably well (to all MediaBench and most of the SPEC2K), while resolving on average 1.72 times more loads to their definition. We propose and evaluate an interprocedural copy propagation and an interprocedural liveness analysis and demonstrate their effectiveness on reducing input and output instructions by 44.5% and 23.3%, respectively. ISSA is then leveraged for constant propagation and dead code removal, where 11.8% additional expressions are folded.
+
+
+
Published:
+
+ "Increasing the scope and resolution of Interprocedural Static Single Assignment"
+
+ Silvian Calman and Jianwen Zhu.
+
+
+ Proceeding of the 16th International Static Analysis Symposium (SAS 2009)
+ , Los Angeles, CA, August, 2009.
+
+
+
+
+
+
+
+
+
Index: llvm-www/pubs/2009-08-SAS-IPSSA.pdf
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.53 llvm-www/pubs/pubs.js:1.54
--- llvm-www/pubs/pubs.js:1.53 Mon Oct 26 00:18:39 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 00:44:41 2009
@@ -1,6 +1,26 @@
// The array should be sorted reverse-chronologically, and will be displayed on
// the page in the order listed.
var PUBS = [
+ {title: 'AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware',
+ published: "28th International Conference, SAFECOMP 2009",
+ location: "Hamburg, Germany",
+ month: 9,
+ year: 2009},
+
+ {title: 'Automatic Generation of Cycle-Approximate TLMs with Timed RTOS Model Support',
+ published: "Analysis, Architectures and Modelling of Embedded Systems 2009 (IESS 2009)",
+ location: "Langenargen, Germany",
+ month: 9,
+ year: 2009},
+
+ {url: '2009-08-SAS-IPSSA.html',
+ title: "Increasing the scope and resolution of Interprocedural Static Single Assignment",
+ author: "Silvian Calman and Jianwen Zhu",
+ published: "Proc. of the 16th International Static Analysis Symposium (SAS 2009)",
+ location: "Los Angeles, CA",
+ month: 8,
+ year: 2009},
+
{url: '2009-08-12-UsenixSecurity-SafeSVAOS.html',
title: 'Memory Safety for Low-Level Software/Hardware Interactions',
author: 'John Criswell, Nicolas Geoffray, and Vikram Adve',
@@ -17,6 +37,20 @@
month: 7,
year: 2009},
+ {title: 'Verifying the Implementation of an Operating System Scheduler',
+ author: 'Moritz Kleine, Bj??rn Bartels, Thomas G??thel, and Sabine Glesner',
+ published: 'IEEE International Symposium on Theoretical Aspects of Software Engineering',
+ location: 'Tianjin, China',
+ month: 7,
+ year: 2009},
+
+ {title: 'Programmable and Scalable Architecture for Graphics Processing Units',
+ author: "Carlos S. Lama, Pekka J????skel??inen, Jarmo Takala",
+ published "Proc. of the 9th International Workshop on Embedded Computer Systems: Architectures, Modeling, and Simulation",
+ location: "Samos, Greece",
+ month: 7,
+ year: 2009},
+
{url: '2009-06-PLDI-LibraryBindings.html',
title: 'Automatic generation of library bindings using static analysis',
author: 'Tristan Ravitch, Steve Jackson, Eric Aderhold, and Ben Liblit',
@@ -97,6 +131,12 @@
month: 4,
year: 2009},
+ {title: 'Scheduling Techniques for Multi-Core Architectures',
+ author: 'Akira Hatanaka and Nader Bagherzadeh',
+ published: "2009 Sixth International Conference on Information Technology: New Generations",
+ month: 4,
+ year: 2009},
+
{url: '2009-03-CGO-ESoftCheck.html',
title: 'ESoftCheck: Removal of Non-vital Checks for Fault Tolerance',
author: 'Jing Yu, Maria Jesus Garzaran, Marc Snir',
From sabre at nondot.org Mon Oct 26 00:49:51 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 00:49:51 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/pubs.js
Message-ID: <200910260549.n9Q5npVu005200@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
pubs.js updated: 1.54 -> 1.55
---
Log message:
try to get this working again
---
Diffs of the changes: (+13 -8)
pubs.js | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.54 llvm-www/pubs/pubs.js:1.55
--- llvm-www/pubs/pubs.js:1.54 Mon Oct 26 00:44:41 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 00:49:35 2009
@@ -1,13 +1,15 @@
// The array should be sorted reverse-chronologically, and will be displayed on
// the page in the order listed.
var PUBS = [
- {title: 'AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware',
+ {url: "",
+ title: "AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware",
published: "28th International Conference, SAFECOMP 2009",
location: "Hamburg, Germany",
month: 9,
year: 2009},
- {title: 'Automatic Generation of Cycle-Approximate TLMs with Timed RTOS Model Support',
+ {url: "",
+ title: "Automatic Generation of Cycle-Approximate TLMs with Timed RTOS Model Support",
published: "Analysis, Architectures and Modelling of Embedded Systems 2009 (IESS 2009)",
location: "Langenargen, Germany",
month: 9,
@@ -37,14 +39,16 @@
month: 7,
year: 2009},
- {title: 'Verifying the Implementation of an Operating System Scheduler',
- author: 'Moritz Kleine, Bj??rn Bartels, Thomas G??thel, and Sabine Glesner',
- published: 'IEEE International Symposium on Theoretical Aspects of Software Engineering',
+ {url: "",
+ title: "Verifying the Implementation of an Operating System Scheduler",
+ author: "Moritz Kleine, Bj??rn Bartels, Thomas G??thel, and Sabine Glesner",
+ published: "IEEE International Symposium on Theoretical Aspects of Software Engineering",
location: 'Tianjin, China',
month: 7,
year: 2009},
- {title: 'Programmable and Scalable Architecture for Graphics Processing Units',
+ {url: "",
+ title: "Programmable and Scalable Architecture for Graphics Processing Units",
author: "Carlos S. Lama, Pekka J????skel??inen, Jarmo Takala",
published "Proc. of the 9th International Workshop on Embedded Computer Systems: Architectures, Modeling, and Simulation",
location: "Samos, Greece",
@@ -131,8 +135,9 @@
month: 4,
year: 2009},
- {title: 'Scheduling Techniques for Multi-Core Architectures',
- author: 'Akira Hatanaka and Nader Bagherzadeh',
+ {url: "",
+ title: "Scheduling Techniques for Multi-Core Architectures",
+ author: "Akira Hatanaka and Nader Bagherzadeh",
published: "2009 Sixth International Conference on Information Technology: New Generations",
month: 4,
year: 2009},
From sabre at nondot.org Mon Oct 26 00:52:07 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 00:52:07 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/pubs.js
Message-ID: <200910260552.n9Q5q70K005302@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
pubs.js updated: 1.55 -> 1.56
---
Log message:
temporarily disable some.
---
Diffs of the changes: (+34 -34)
pubs.js | 68 ++++++++++++++++++++++++++++++++--------------------------------
1 files changed, 34 insertions(+), 34 deletions(-)
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.55 llvm-www/pubs/pubs.js:1.56
--- llvm-www/pubs/pubs.js:1.55 Mon Oct 26 00:49:35 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 00:51:51 2009
@@ -1,19 +1,19 @@
// The array should be sorted reverse-chronologically, and will be displayed on
// the page in the order listed.
var PUBS = [
- {url: "",
- title: "AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware",
- published: "28th International Conference, SAFECOMP 2009",
- location: "Hamburg, Germany",
- month: 9,
- year: 2009},
-
- {url: "",
- title: "Automatic Generation of Cycle-Approximate TLMs with Timed RTOS Model Support",
- published: "Analysis, Architectures and Modelling of Embedded Systems 2009 (IESS 2009)",
- location: "Langenargen, Germany",
- month: 9,
- year: 2009},
+// {url: "",
+// title: "AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware",
+// published: "28th International Conference, SAFECOMP 2009",
+// location: "Hamburg, Germany",
+// month: 9,
+// year: 2009},
+
+// {url: "",
+// title: "Automatic Generation of Cycle-Approximate TLMs with Timed RTOS Model Support",
+// published: "Analysis, Architectures and Modelling of Embedded Systems 2009 (IESS 2009)",
+// location: "Langenargen, Germany",
+// month: 9,
+// year: 2009},
{url: '2009-08-SAS-IPSSA.html',
title: "Increasing the scope and resolution of Interprocedural Static Single Assignment",
@@ -39,21 +39,21 @@
month: 7,
year: 2009},
- {url: "",
- title: "Verifying the Implementation of an Operating System Scheduler",
- author: "Moritz Kleine, Bj??rn Bartels, Thomas G??thel, and Sabine Glesner",
- published: "IEEE International Symposium on Theoretical Aspects of Software Engineering",
- location: 'Tianjin, China',
- month: 7,
- year: 2009},
-
- {url: "",
- title: "Programmable and Scalable Architecture for Graphics Processing Units",
- author: "Carlos S. Lama, Pekka J????skel??inen, Jarmo Takala",
- published "Proc. of the 9th International Workshop on Embedded Computer Systems: Architectures, Modeling, and Simulation",
- location: "Samos, Greece",
- month: 7,
- year: 2009},
+// {url: "",
+// title: "Verifying the Implementation of an Operating System Scheduler",
+// author: "Moritz Kleine, Bj??rn Bartels, Thomas G??thel, and Sabine Glesner",
+// published: "IEEE International Symposium on Theoretical Aspects of Software Engineering",
+// location: 'Tianjin, China',
+// month: 7,
+// year: 2009},
+
+// {url: "",
+// title: "Programmable and Scalable Architecture for Graphics Processing Units",
+// author: "Carlos S. Lama, Pekka J????skel??inen, Jarmo Takala",
+// published "Proc. of the 9th International Workshop on Embedded Computer Systems: Architectures, Modeling, and Simulation",
+// location: "Samos, Greece",
+// month: 7,
+// year: 2009},
{url: '2009-06-PLDI-LibraryBindings.html',
title: 'Automatic generation of library bindings using static analysis',
@@ -135,12 +135,12 @@
month: 4,
year: 2009},
- {url: "",
- title: "Scheduling Techniques for Multi-Core Architectures",
- author: "Akira Hatanaka and Nader Bagherzadeh",
- published: "2009 Sixth International Conference on Information Technology: New Generations",
- month: 4,
- year: 2009},
+// {url: "",
+// title: "Scheduling Techniques for Multi-Core Architectures",
+// author: "Akira Hatanaka and Nader Bagherzadeh",
+// published: "2009 Sixth International Conference on Information Technology: New Generations",
+// month: 4,
+// year: 2009},
{url: '2009-03-CGO-ESoftCheck.html',
title: 'ESoftCheck: Removal of Non-vital Checks for Fault Tolerance',
From sabre at nondot.org Mon Oct 26 00:52:29 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 00:52:29 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/pubs.js
Message-ID: <200910260552.n9Q5qTcY005340@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
pubs.js updated: 1.56 -> 1.57
---
Log message:
add one back
---
Diffs of the changes: (+6 -6)
pubs.js | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.56 llvm-www/pubs/pubs.js:1.57
--- llvm-www/pubs/pubs.js:1.56 Mon Oct 26 00:51:51 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 00:52:13 2009
@@ -135,12 +135,12 @@
month: 4,
year: 2009},
-// {url: "",
-// title: "Scheduling Techniques for Multi-Core Architectures",
-// author: "Akira Hatanaka and Nader Bagherzadeh",
-// published: "2009 Sixth International Conference on Information Technology: New Generations",
-// month: 4,
-// year: 2009},
+ {url: "",
+ title: "Scheduling Techniques for Multi-Core Architectures",
+ author: "Akira Hatanaka and Nader Bagherzadeh",
+ published: "2009 Sixth International Conference on Information Technology: New Generations",
+ month: 4,
+ year: 2009},
{url: '2009-03-CGO-ESoftCheck.html',
title: 'ESoftCheck: Removal of Non-vital Checks for Fault Tolerance',
From sabre at nondot.org Mon Oct 26 00:53:41 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 00:53:41 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/pubs.js
Message-ID: <200910260553.n9Q5rfdV005414@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
pubs.js updated: 1.57 -> 1.58
---
Log message:
add some more
---
Diffs of the changes: (+13 -13)
pubs.js | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.57 llvm-www/pubs/pubs.js:1.58
--- llvm-www/pubs/pubs.js:1.57 Mon Oct 26 00:52:13 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 00:53:25 2009
@@ -1,19 +1,19 @@
// The array should be sorted reverse-chronologically, and will be displayed on
// the page in the order listed.
var PUBS = [
-// {url: "",
-// title: "AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware",
-// published: "28th International Conference, SAFECOMP 2009",
-// location: "Hamburg, Germany",
-// month: 9,
-// year: 2009},
+ {url: "",
+ title: "AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware",
+ published: "28th International Conference, SAFECOMP 2009",
+ location: "Hamburg, Germany",
+ month: 9,
+ year: 2009},
-// {url: "",
-// title: "Automatic Generation of Cycle-Approximate TLMs with Timed RTOS Model Support",
-// published: "Analysis, Architectures and Modelling of Embedded Systems 2009 (IESS 2009)",
-// location: "Langenargen, Germany",
-// month: 9,
-// year: 2009},
+ {url: "",
+ title: "Automatic Generation of Cycle-Approximate TLMs with Timed RTOS Model Support",
+ published: "Analysis, Architectures and Modelling of Embedded Systems 2009 (IESS 2009)",
+ location: "Langenargen, Germany",
+ month: 9,
+ year: 2009},
{url: '2009-08-SAS-IPSSA.html',
title: "Increasing the scope and resolution of Interprocedural Static Single Assignment",
@@ -135,7 +135,7 @@
month: 4,
year: 2009},
- {url: "",
+ {//url: "",
title: "Scheduling Techniques for Multi-Core Architectures",
author: "Akira Hatanaka and Nader Bagherzadeh",
published: "2009 Sixth International Conference on Information Technology: New Generations",
From sabre at nondot.org Mon Oct 26 00:54:07 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 00:54:07 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/pubs.js
Message-ID: <200910260554.n9Q5s7jC005452@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
pubs.js updated: 1.58 -> 1.59
---
Log message:
add a URL
---
Diffs of the changes: (+1 -1)
pubs.js | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.58 llvm-www/pubs/pubs.js:1.59
--- llvm-www/pubs/pubs.js:1.58 Mon Oct 26 00:53:25 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 00:53:51 2009
@@ -135,7 +135,7 @@
month: 4,
year: 2009},
- {//url: "",
+ {url: "",
title: "Scheduling Techniques for Multi-Core Architectures",
author: "Akira Hatanaka and Nader Bagherzadeh",
published: "2009 Sixth International Conference on Information Technology: New Generations",
From sabre at nondot.org Mon Oct 26 00:55:45 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 00:55:45 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/pubs.js
Message-ID: <200910260555.n9Q5tj6n005544@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
pubs.js updated: 1.59 -> 1.60
---
Log message:
remove again. :(
---
Diffs of the changes: (+6 -6)
pubs.js | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.59 llvm-www/pubs/pubs.js:1.60
--- llvm-www/pubs/pubs.js:1.59 Mon Oct 26 00:53:51 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 00:55:30 2009
@@ -1,12 +1,12 @@
// The array should be sorted reverse-chronologically, and will be displayed on
// the page in the order listed.
var PUBS = [
- {url: "",
- title: "AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware",
- published: "28th International Conference, SAFECOMP 2009",
- location: "Hamburg, Germany",
- month: 9,
- year: 2009},
+// {url: "",
+// title: "AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware",
+// published: "28th International Conference, SAFECOMP 2009",
+// location: "Hamburg, Germany",
+// month: 9,
+// year: 2009},
{url: "",
title: "Automatic Generation of Cycle-Approximate TLMs with Timed RTOS Model Support",
From sabre at nondot.org Mon Oct 26 00:56:17 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 00:56:17 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/pubs.js
Message-ID: <200910260556.n9Q5uHHQ005592@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
pubs.js updated: 1.60 -> 1.61
---
Log message:
next one
---
Diffs of the changes: (+11 -11)
pubs.js | 22 +++++++++++-----------
1 files changed, 11 insertions(+), 11 deletions(-)
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.60 llvm-www/pubs/pubs.js:1.61
--- llvm-www/pubs/pubs.js:1.60 Mon Oct 26 00:55:30 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 00:56:00 2009
@@ -1,19 +1,19 @@
// The array should be sorted reverse-chronologically, and will be displayed on
// the page in the order listed.
var PUBS = [
-// {url: "",
-// title: "AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware",
-// published: "28th International Conference, SAFECOMP 2009",
-// location: "Hamburg, Germany",
-// month: 9,
-// year: 2009},
-
{url: "",
- title: "Automatic Generation of Cycle-Approximate TLMs with Timed RTOS Model Support",
- published: "Analysis, Architectures and Modelling of Embedded Systems 2009 (IESS 2009)",
- location: "Langenargen, Germany",
+ title: "AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware",
+ published: "28th International Conference, SAFECOMP 2009",
+ location: "Hamburg, Germany",
month: 9,
- year: 2009},
+ year: 2009},
+
+// {url: "",
+// title: "Automatic Generation of Cycle-Approximate TLMs with Timed RTOS Model Support",
+// published: "Analysis, Architectures and Modelling of Embedded Systems 2009 (IESS 2009)",
+// location: "Langenargen, Germany",
+// month: 9,
+// year: 2009},
{url: '2009-08-SAS-IPSSA.html',
title: "Increasing the scope and resolution of Interprocedural Static Single Assignment",
From sabre at nondot.org Mon Oct 26 00:56:43 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 00:56:43 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/pubs.js
Message-ID: <200910260556.n9Q5uhmt005636@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
pubs.js updated: 1.61 -> 1.62
---
Log message:
neither of these work?
---
Diffs of the changes: (+6 -6)
pubs.js | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.61 llvm-www/pubs/pubs.js:1.62
--- llvm-www/pubs/pubs.js:1.61 Mon Oct 26 00:56:00 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 00:56:28 2009
@@ -1,12 +1,12 @@
// The array should be sorted reverse-chronologically, and will be displayed on
// the page in the order listed.
var PUBS = [
- {url: "",
- title: "AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware",
- published: "28th International Conference, SAFECOMP 2009",
- location: "Hamburg, Germany",
- month: 9,
- year: 2009},
+// {url: "",
+// title: "AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware",
+// published: "28th International Conference, SAFECOMP 2009",
+// location: "Hamburg, Germany",
+// month: 9,
+// year: 2009},
// {url: "",
// title: "Automatic Generation of Cycle-Approximate TLMs with Timed RTOS Model Support",
From sabre at nondot.org Mon Oct 26 00:57:29 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 00:57:29 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/pubs.js
Message-ID: <200910260557.n9Q5vTgj005690@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
pubs.js updated: 1.62 -> 1.63
---
Log message:
theory: we *must* have an author field.
---
Diffs of the changes: (+14 -12)
pubs.js | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.62 llvm-www/pubs/pubs.js:1.63
--- llvm-www/pubs/pubs.js:1.62 Mon Oct 26 00:56:28 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 00:57:14 2009
@@ -1,19 +1,21 @@
// The array should be sorted reverse-chronologically, and will be displayed on
// the page in the order listed.
var PUBS = [
-// {url: "",
-// title: "AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware",
-// published: "28th International Conference, SAFECOMP 2009",
-// location: "Hamburg, Germany",
-// month: 9,
-// year: 2009},
+ {url: "",
+ title: "AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware",
+ published: "28th International Conference, SAFECOMP 2009",
+ author: "",
+ location: "Hamburg, Germany",
+ month: 9,
+ year: 2009},
-// {url: "",
-// title: "Automatic Generation of Cycle-Approximate TLMs with Timed RTOS Model Support",
-// published: "Analysis, Architectures and Modelling of Embedded Systems 2009 (IESS 2009)",
-// location: "Langenargen, Germany",
-// month: 9,
-// year: 2009},
+ {url: "",
+ title: "Automatic Generation of Cycle-Approximate TLMs with Timed RTOS Model Support",
+ published: "Analysis, Architectures and Modelling of Embedded Systems 2009 (IESS 2009)",
+ author: "",
+ location: "Langenargen, Germany",
+ month: 9,
+ year: 2009},
{url: '2009-08-SAS-IPSSA.html',
title: "Increasing the scope and resolution of Interprocedural Static Single Assignment",
From sabre at nondot.org Mon Oct 26 00:58:59 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 00:58:59 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/pubs.js
Message-ID: <200910260558.n9Q5wxIu005776@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
pubs.js updated: 1.63 -> 1.64
---
Log message:
that was it, add the rest back, sorry for the thrashing.
---
Diffs of the changes: (+17 -17)
pubs.js | 34 +++++++++++++++++-----------------
1 files changed, 17 insertions(+), 17 deletions(-)
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.63 llvm-www/pubs/pubs.js:1.64
--- llvm-www/pubs/pubs.js:1.63 Mon Oct 26 00:57:14 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 00:58:43 2009
@@ -4,7 +4,7 @@
{url: "",
title: "AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware",
published: "28th International Conference, SAFECOMP 2009",
- author: "",
+ author: "Christof Fetzer, Ute Schiffel, and Martin S????kraut",
location: "Hamburg, Germany",
month: 9,
year: 2009},
@@ -12,7 +12,7 @@
{url: "",
title: "Automatic Generation of Cycle-Approximate TLMs with Timed RTOS Model Support",
published: "Analysis, Architectures and Modelling of Embedded Systems 2009 (IESS 2009)",
- author: "",
+ author: "Yonghyun Hwang, Gunar Schirner, and Samar Abdi",
location: "Langenargen, Germany",
month: 9,
year: 2009},
@@ -41,21 +41,21 @@
month: 7,
year: 2009},
-// {url: "",
-// title: "Verifying the Implementation of an Operating System Scheduler",
-// author: "Moritz Kleine, Bj??rn Bartels, Thomas G??thel, and Sabine Glesner",
-// published: "IEEE International Symposium on Theoretical Aspects of Software Engineering",
-// location: 'Tianjin, China',
-// month: 7,
-// year: 2009},
-
-// {url: "",
-// title: "Programmable and Scalable Architecture for Graphics Processing Units",
-// author: "Carlos S. Lama, Pekka J????skel??inen, Jarmo Takala",
-// published "Proc. of the 9th International Workshop on Embedded Computer Systems: Architectures, Modeling, and Simulation",
-// location: "Samos, Greece",
-// month: 7,
-// year: 2009},
+ {url: "",
+ title: "Verifying the Implementation of an Operating System Scheduler",
+ author: "Moritz Kleine, Bj??rn Bartels, Thomas G??thel, and Sabine Glesner",
+ published: "IEEE International Symposium on Theoretical Aspects of Software Engineering",
+ location: 'Tianjin, China',
+ month: 7,
+ year: 2009},
+
+ {url: "",
+ title: "Programmable and Scalable Architecture for Graphics Processing Units",
+ author: "Carlos S. Lama, Pekka J????skel??inen, Jarmo Takala",
+ published "Proc. of the 9th International Workshop on Embedded Computer Systems: Architectures, Modeling, and Simulation",
+ location: "Samos, Greece",
+ month: 7,
+ year: 2009},
{url: '2009-06-PLDI-LibraryBindings.html',
title: 'Automatic generation of library bindings using static analysis',
From sabre at nondot.org Mon Oct 26 01:01:35 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 01:01:35 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/pubs.js
Message-ID: <200910260601.n9Q61Z9I005894@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
pubs.js updated: 1.64 -> 1.65
---
Log message:
kill funny characters?
---
Diffs of the changes: (+3 -3)
pubs.js | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.64 llvm-www/pubs/pubs.js:1.65
--- llvm-www/pubs/pubs.js:1.64 Mon Oct 26 00:58:43 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 01:01:18 2009
@@ -4,7 +4,7 @@
{url: "",
title: "AN-Encoding Compiler: Building Safety-Critical Systems with Commodity Hardware",
published: "28th International Conference, SAFECOMP 2009",
- author: "Christof Fetzer, Ute Schiffel, and Martin S????kraut",
+ author: "Christof Fetzer, Ute Schiffel, and Martin SuBkraut",
location: "Hamburg, Germany",
month: 9,
year: 2009},
@@ -43,7 +43,7 @@
{url: "",
title: "Verifying the Implementation of an Operating System Scheduler",
- author: "Moritz Kleine, Bj??rn Bartels, Thomas G??thel, and Sabine Glesner",
+ author: "Moritz Kleine, Bjorn Bartels, Thomas Gothel, and Sabine Glesner",
published: "IEEE International Symposium on Theoretical Aspects of Software Engineering",
location: 'Tianjin, China',
month: 7,
@@ -51,7 +51,7 @@
{url: "",
title: "Programmable and Scalable Architecture for Graphics Processing Units",
- author: "Carlos S. Lama, Pekka J????skel??inen, Jarmo Takala",
+ author: "Carlos S. Lama, Pekka Jaaskelainen, Jarmo Takala",
published "Proc. of the 9th International Workshop on Embedded Computer Systems: Architectures, Modeling, and Simulation",
location: "Samos, Greece",
month: 7,
From sabre at nondot.org Mon Oct 26 01:02:57 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 01:02:57 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/pubs.js
Message-ID: <200910260602.n9Q62vJD005959@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
pubs.js updated: 1.65 -> 1.66
---
Log message:
I hate the internet
---
Diffs of the changes: (+7 -7)
pubs.js | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.65 llvm-www/pubs/pubs.js:1.66
--- llvm-www/pubs/pubs.js:1.65 Mon Oct 26 01:01:18 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 01:02:41 2009
@@ -41,13 +41,13 @@
month: 7,
year: 2009},
- {url: "",
- title: "Verifying the Implementation of an Operating System Scheduler",
- author: "Moritz Kleine, Bjorn Bartels, Thomas Gothel, and Sabine Glesner",
- published: "IEEE International Symposium on Theoretical Aspects of Software Engineering",
- location: 'Tianjin, China',
- month: 7,
- year: 2009},
+ // {url: "",
+ // title: "Verifying the Implementation of an Operating System Scheduler",
+ // author: "Moritz Kleine, Bjorn Bartels, Thomas Gothel, and Sabine Glesner",
+ // published: "IEEE International Symposium on Theoretical Aspects of Software Engineering",
+ // location: 'Tianjin, China',
+ // month: 7,
+ // year: 2009},
{url: "",
title: "Programmable and Scalable Architecture for Graphics Processing Units",
From sabre at nondot.org Mon Oct 26 01:03:33 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 01:03:33 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/pubs.js
Message-ID: <200910260603.n9Q63Xkj006002@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
pubs.js updated: 1.66 -> 1.67
---
Log message:
missing colon.
---
Diffs of the changes: (+8 -8)
pubs.js | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.66 llvm-www/pubs/pubs.js:1.67
--- llvm-www/pubs/pubs.js:1.66 Mon Oct 26 01:02:41 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 01:03:17 2009
@@ -41,18 +41,18 @@
month: 7,
year: 2009},
- // {url: "",
- // title: "Verifying the Implementation of an Operating System Scheduler",
- // author: "Moritz Kleine, Bjorn Bartels, Thomas Gothel, and Sabine Glesner",
- // published: "IEEE International Symposium on Theoretical Aspects of Software Engineering",
- // location: 'Tianjin, China',
- // month: 7,
- // year: 2009},
+ {url: "",
+ title: "Verifying the Implementation of an Operating System Scheduler",
+ author: "Moritz Kleine, Bjorn Bartels, Thomas Gothel, and Sabine Glesner",
+ published: "IEEE International Symposium on Theoretical Aspects of Software Engineering",
+ location: 'Tianjin, China',
+ month: 7,
+ year: 2009},
{url: "",
title: "Programmable and Scalable Architecture for Graphics Processing Units",
author: "Carlos S. Lama, Pekka Jaaskelainen, Jarmo Takala",
- published "Proc. of the 9th International Workshop on Embedded Computer Systems: Architectures, Modeling, and Simulation",
+ published: "Proc. of the 9th International Workshop on Embedded Computer Systems: Architectures, Modeling, and Simulation",
location: "Samos, Greece",
month: 7,
year: 2009},
From daniel at zuster.org Mon Oct 26 01:08:10 2009
From: daniel at zuster.org (Daniel Dunbar)
Date: Sun, 25 Oct 2009 23:08:10 -0700
Subject: [llvm-commits] [llvm] r83353 - in /llvm/trunk:
lib/ExecutionEngine/JIT/JITEmitter.cpp
unittests/ExecutionEngine/JIT/JITTest.cpp
In-Reply-To: <200910060035.n960Zuca025893@zion.cs.uiuc.edu>
References: <200910060035.n960Zuca025893@zion.cs.uiuc.edu>
Message-ID: <6a8523d60910252308p3db171bh75a1ce1d6669726b@mail.gmail.com>
On Mon, Oct 5, 2009 at 5:35 PM, Jeffrey Yasskin wrote:
> Author: jyasskin
> Date: Mon Oct ?5 19:35:55 2009
> New Revision: 83353
>
> URL: http://llvm.org/viewvc/llvm-project?rev=83353&view=rev
> Log:
> Fix http://llvm.org/PR5116 by rolling back r60822. ?This passes `make unittests
> check-lit` on both x86-64 Linux and x86-32 Darwin.
Note that the unittests are automatically run as part of 'make check-lit'.
- Daniel
>
> Modified:
> ? ?llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp
> ? ?llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp
>
> Modified: llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp?rev=83353&r1=83352&r2=83353&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp (original)
> +++ llvm/trunk/lib/ExecutionEngine/JIT/JITEmitter.cpp Mon Oct ?5 19:35:55 2009
> @@ -644,7 +644,7 @@
> ? // If we have already compiled the function, return a pointer to its body.
> ? Function *F = cast(V);
> ? void *ResultPtr;
> - ?if (!DoesntNeedStub && !TheJIT->isLazyCompilationDisabled()) {
> + ?if (!DoesntNeedStub) {
> ? ? // Return the function stub if it's already created.
> ? ? ResultPtr = Resolver.getFunctionStubIfAvailable(F);
> ? ? if (ResultPtr)
>
> Modified: llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp?rev=83353&r1=83352&r2=83353&view=diff
>
> ==============================================================================
> --- llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp (original)
> +++ llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp Mon Oct ?5 19:35:55 2009
> @@ -22,6 +22,7 @@
> ?#include "llvm/Module.h"
> ?#include "llvm/ModuleProvider.h"
> ?#include "llvm/Support/IRBuilder.h"
> +#include "llvm/Support/TypeBuilder.h"
> ?#include "llvm/Target/TargetSelect.h"
> ?#include "llvm/Type.h"
>
> @@ -44,6 +45,21 @@
> ? return F;
> ?}
>
> +class JITTest : public testing::Test {
> + protected:
> + ?virtual void SetUp() {
> + ? ?M = new Module("", Context);
> + ? ?std::string Error;
> + ? ?TheJIT.reset(EngineBuilder(M).setEngineKind(EngineKind::JIT)
> + ? ? ? ? ? ? ? ? .setErrorStr(&Error).create());
> + ? ?ASSERT_TRUE(TheJIT.get() != NULL) << Error;
> + ?}
> +
> + ?LLVMContext Context;
> + ?Module *M; ?// Owned by ExecutionEngine.
> + ?OwningPtr TheJIT;
> +};
> +
> ?// Regression test for a bug. ?The JIT used to allocate globals inside the same
> ?// memory block used for the function, and when the function code was freed,
> ?// the global was left in the same place. ?This test allocates a function
> @@ -115,6 +131,43 @@
> ? EXPECT_EQ(3, *GPtr);
> ?}
>
> +int PlusOne(int arg) {
> + ?return arg + 1;
> +}
> +
> +TEST_F(JITTest, FarCallToKnownFunction) {
> + ?// x86-64 can only make direct calls to functions within 32 bits of
> + ?// the current PC. ?To call anything farther away, we have to load
> + ?// the address into a register and call through the register. ?The
> + ?// current JIT does this by allocating a stub for any far call.
> + ?// There was a bug in which the JIT tried to emit a direct call when
> + ?// the target was already in the JIT's global mappings and lazy
> + ?// compilation was disabled.
> +
> + ?Function *KnownFunction = Function::Create(
> + ? ? ?TypeBuilder::get(Context),
> + ? ? ?GlobalValue::ExternalLinkage, "known", M);
> + ?TheJIT->addGlobalMapping(KnownFunction, (void*)(intptr_t)PlusOne);
> +
> + ?// int test() { return known(7); }
> + ?Function *TestFunction = Function::Create(
> + ? ? ?TypeBuilder::get(Context),
> + ? ? ?GlobalValue::ExternalLinkage, "test", M);
> + ?BasicBlock *Entry = BasicBlock::Create(Context, "entry", TestFunction);
> + ?IRBuilder<> Builder(Entry);
> + ?Value *result = Builder.CreateCall(
> + ? ? ?KnownFunction,
> + ? ? ?ConstantInt::get(TypeBuilder::get(Context), 7));
> + ?Builder.CreateRet(result);
> +
> + ?TheJIT->EnableDlsymStubs(false);
> + ?TheJIT->DisableLazyCompilation();
> + ?int (*TestFunctionPtr)() = reinterpret_cast(
> + ? ? ?(intptr_t)TheJIT->getPointerToFunction(TestFunction));
> + ?// This used to crash in trying to call PlusOne().
> + ?EXPECT_EQ(8, TestFunctionPtr());
> +}
> +
> ?// This code is copied from JITEventListenerTest, but it only runs once for all
> ?// the tests in this directory. ?Everything seems fine, but that's strange
> ?// behavior.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
From sabre at nondot.org Mon Oct 26 01:20:24 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 01:20:24 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/2009-08-Zoltar.html
2009-08-Zoltar.pdf pubs.js
Message-ID: <200910260620.n9Q6KOWW006712@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
2009-08-Zoltar.html added (r1.1)
2009-08-Zoltar.pdf added (r1.1)
pubs.js updated: 1.67 -> 1.68
---
Log message:
add Zoltar: a spectrum-based fault localization tool and another one without
a pdf.
---
Diffs of the changes: (+79 -0)
2009-08-Zoltar.html | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++
2009-08-Zoltar.pdf | 0
pubs.js | 15 ++++++++++++
3 files changed, 79 insertions(+)
Index: llvm-www/pubs/2009-08-Zoltar.html
diff -c /dev/null llvm-www/pubs/2009-08-Zoltar.html:1.1
*** /dev/null Mon Oct 26 01:19:55 2009
--- llvm-www/pubs/2009-08-Zoltar.html Mon Oct 26 01:19:45 2009
***************
*** 0 ****
--- 1,64 ----
+
+
+
+
+
+ Zoltar: a spectrum-based fault localization tool
+
+
+
+
+ Zoltar: a spectrum-based fault localization tool
+
+
+ Tom Janssen, Rui Abreu, and Arjan J.C. van Gemund
+
+
+
Abstract:
+
+ Locating software components which are responsible for observed failures is the most expensive, error-prone phase in the software development life cycle. Automated diagnosis of software faults can improve the efficiency of the debugging process, and is therefore an important process for the development of dependable software. In this paper we present a toolset for automatic fault localization, dubbed Zoltar, which adopts a spectrum-based fault localization technique. The toolset provides the infrastructure to automatically instrument the source code of software programs to produce runtime data, which is subsequently analyzed to return a ranked list of likely faulty locations. Aimed at total automation (e.g., for runtime fault diagnosis), Zoltar has the capability of instrumenting the program under analysis with fault screeners, for automatic error detection. Using a small thread-based example program as well as a large realistic program, we show the applicability of the pr!
oposed toolset.
+
+
+
Published:
+
+ "Zoltar: a spectrum-based fault localization tool"
+
+ Tom Janssen, Rui Abreu, and Arjan J.C. van Gemund.
+
+
+ Proceedings of the 2009 ESEC/FSE workshop on Software integration and evolution @ runtime
+ , Amsterdam, The Netherlands, August 2009.
+
+ @inproceedings{1596502,
+ author = {Janssen, Tom and Abreu, Rui and van Gemund, Arjan J.C.},
+ title = {Zoltar: a spectrum-based fault localization tool},
+ booktitle = {SINTER '09: Proceedings of the 2009 ESEC/FSE workshop on Software integration and evolution @ runtime},
+ year = {2009},
+ isbn = {978-1-60558-681-6},
+ pages = {23--30},
+ location = {Amsterdam, The Netherlands},
+ doi = {http://doi.acm.org/10.1145/1596495.1596502},
+ publisher = {ACM},
+ address = {New York, NY, USA},
+ }
+
+
+
+
+
+
+
+
+
Index: llvm-www/pubs/2009-08-Zoltar.pdf
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.67 llvm-www/pubs/pubs.js:1.68
--- llvm-www/pubs/pubs.js:1.67 Mon Oct 26 01:03:17 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 01:19:45 2009
@@ -33,6 +33,14 @@
month: 8,
year: 2009},
+ {url: '2009-08-Zoltar.html',
+ title: "Zoltar: a spectrum-based fault localization tool",
+ author: "Tom Janssen, Rui Abreu, and Arjan J.C. van Gemund",
+ published: "Proc. of the 2009 ESEC/FSE workshop on Software integration and evolution @ runtime",
+ location: "Amsterdam, The Netherlands",
+ month: 8,
+ year: 2009},
+
{url: '2009-07-ISSTA-BegBunch.html',
title: 'BegBunch: benchmarking for C bug detection tools',
author: 'Cristina Cifuentes, Christian Hoermann, Nathan Keynes, Lian Li, Simon Long, Erica Mealy, Michael Mounteney, and Bernhard Scholz',
@@ -172,6 +180,13 @@
month: 3,
year: 2009},
+ {url: "",
+ title: "SORU: A Reconfigurable Vector Unit for Adaptable Embedded Systems",
+ author: "Jos?? M. Moya, Javier Rodr??guez, et al",
+ published: "Proc. of the 5th International Workshop on Reconfigurable Computing: Architectures, Tools and Applications",
+ month: 3,
+ year: 2009},
+
{url: '2009-02-PPoPP-MappingParallelism.html',
title: 'Mapping parallelism to multi-cores: a machine learning based approach',
author: "Zheng Wang and Michael F.P. O'Boyle",
From sabre at nondot.org Mon Oct 26 01:29:41 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 01:29:41 -0500
Subject: [llvm-commits] CVS: llvm-www/pubs/2009-08-FSE-Altair.html
2009-08-FSE-Altair.pdf pubs.js
Message-ID: <200910260629.n9Q6Tf4P007045@zion.cs.uiuc.edu>
Changes in directory llvm-www/pubs:
2009-08-FSE-Altair.html added (r1.1)
2009-08-FSE-Altair.pdf added (r1.1)
pubs.js updated: 1.68 -> 1.69
---
Log message:
add a couple more.
---
Diffs of the changes: (+70 -0)
2009-08-FSE-Altair.html | 55 ++++++++++++++++++++++++++++++++++++++++++++++++
2009-08-FSE-Altair.pdf | 0
pubs.js | 15 +++++++++++++
3 files changed, 70 insertions(+)
Index: llvm-www/pubs/2009-08-FSE-Altair.html
diff -c /dev/null llvm-www/pubs/2009-08-FSE-Altair.html:1.1
*** /dev/null Mon Oct 26 01:29:34 2009
--- llvm-www/pubs/2009-08-FSE-Altair.html Mon Oct 26 01:29:24 2009
***************
*** 0 ****
--- 1,55 ----
+
+
+
+
+
+ API hyperlinking via structural overlap
+
+
+
+
+ API hyperlinking via structural overlap
+
+
+ Fan Long, Xi Wang, and Yang Cai
+
+
+
Abstract:
+
+ This paper presents a tool Altair that automatically generates API function cross-references, which emphasizes reliable structural measures and does not depend on specific client code. Altair ranks related API functions for a given query according to pair-wise overlap, i.e., how they share state, and clusters tightly related ones into meaningful modules.
+
+ Experiments against several popular C software packages show that Altair recommends related API functions for a given query with remarkably more precise and complete results than previous tools, that it can extract modules from moderate-sized software (e.g., Apache with 1000+ functions) at high precision and recall rates (e.g., both exceeding 70% for two modules in Apache), and that the computation can finish within a few seconds.
+
+
+
Published:
+
+ "API hyperlinking via structural overlap"
+
+ Fan Long, Xi Wang, and Yang Cai.
+
+
+ Proceedings of the 7th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering on European software engineering conference and foundations of software engineering symposium (FSE'09)
+ , Amsterdam, The Netherlands, August 2009.
+
+
+
+
+
+
+
+
+
Index: llvm-www/pubs/2009-08-FSE-Altair.pdf
Index: llvm-www/pubs/pubs.js
diff -u llvm-www/pubs/pubs.js:1.68 llvm-www/pubs/pubs.js:1.69
--- llvm-www/pubs/pubs.js:1.68 Mon Oct 26 01:19:45 2009
+++ llvm-www/pubs/pubs.js Mon Oct 26 01:29:24 2009
@@ -17,6 +17,14 @@
month: 9,
year: 2009},
+ {url: "2009-08-FSE-Altair.html",
+ title: "API hyperlinking via structural overlap",
+ published: "Proc. of the ACM symposium on The foundations of software engineering symposium (FSE'09)",
+ author: "Fan Long, Xi Wang, and Yang Cai",
+ location: "Amsterdam, The Netherlands",
+ month: 8,
+ year: 2009},
+
{url: '2009-08-SAS-IPSSA.html',
title: "Increasing the scope and resolution of Interprocedural Static Single Assignment",
author: "Silvian Calman and Jianwen Zhu",
@@ -187,6 +195,13 @@
month: 3,
year: 2009},
+ {url: "",
+ title: "Compiling Techniques for Coarse Grained Runtime Reconfigurable Architecture",
+ author: "Mythri Alle, Keshavan Varadarajan, Alexander Fell, S. K. Nandy and Ranjani Narayan",
+ published: "Proc. of the 5th International Workshop on Reconfigurable Computing: Architectures, Tools and Applications",
+ month: 3,
+ year: 2009},
+
{url: '2009-02-PPoPP-MappingParallelism.html',
title: 'Mapping parallelism to multi-cores: a machine learning based approach',
author: "Zheng Wang and Michael F.P. O'Boyle",
From jyasskin at google.com Mon Oct 26 02:19:16 2009
From: jyasskin at google.com (Jeffrey Yasskin)
Date: Mon, 26 Oct 2009 00:19:16 -0700
Subject: [llvm-commits] [llvm] r83353 - in /llvm/trunk:
lib/ExecutionEngine/JIT/JITEmitter.cpp
unittests/ExecutionEngine/JIT/JITTest.cpp
In-Reply-To: <6a8523d60910252308p3db171bh75a1ce1d6669726b@mail.gmail.com>
References: <200910060035.n960Zuca025893@zion.cs.uiuc.edu>
<6a8523d60910252308p3db171bh75a1ce1d6669726b@mail.gmail.com>
Message-ID:
On Sun, Oct 25, 2009 at 11:08 PM, Daniel Dunbar wrote:
> On Mon, Oct 5, 2009 at 5:35 PM, Jeffrey Yasskin wrote:
>> Author: jyasskin
>> Date: Mon Oct ?5 19:35:55 2009
>> New Revision: 83353
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=83353&view=rev
>> Log:
>> Fix http://llvm.org/PR5116 by rolling back r60822. ?This passes `make unittests
>> check-lit` on both x86-64 Linux and x86-32 Darwin.
>
> Note that the unittests are automatically run as part of 'make check-lit'.
Thanks :)
From gohman at apple.com Mon Oct 26 10:32:57 2009
From: gohman at apple.com (Dan Gohman)
Date: Mon, 26 Oct 2009 15:32:57 -0000
Subject: [llvm-commits] [llvm] r85118 - in /llvm/trunk:
lib/Transforms/Scalar/LoopStrengthReduce.cpp
test/CodeGen/X86/negative-stride-fptosi-user.ll
Message-ID: <200910261532.n9QFWvqE018728@zion.cs.uiuc.edu>
Author: djg
Date: Mon Oct 26 10:32:57 2009
New Revision: 85118
URL: http://llvm.org/viewvc/llvm-project?rev=85118&view=rev
Log:
Make LSR's OptimizeShadowIV ignore induction variables with negative
strides for now, because it doesn't handle them correctly. This fixes a
miscompile of SingleSource/Benchmarks/Misc-C++/ray.
This problem was usually hidden because indvars transforms such induction
variables into negations of canonical induction variables.
Added:
llvm/trunk/test/CodeGen/X86/negative-stride-fptosi-user.ll
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=85118&r1=85117&r2=85118&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Oct 26 10:32:57 2009
@@ -2262,6 +2262,10 @@
if (!C) continue;
+ // Ignore negative constants, as the code below doesn't handle them
+ // correctly. TODO: Remove this restriction.
+ if (!C->getValue().isStrictlyPositive()) continue;
+
/* Add new PHINode. */
PHINode *NewPH = PHINode::Create(DestTy, "IV.S.", PH);
Added: llvm/trunk/test/CodeGen/X86/negative-stride-fptosi-user.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/negative-stride-fptosi-user.ll?rev=85118&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/negative-stride-fptosi-user.ll (added)
+++ llvm/trunk/test/CodeGen/X86/negative-stride-fptosi-user.ll Mon Oct 26 10:32:57 2009
@@ -0,0 +1,25 @@
+; RUN: llc < %s -march=x86-64 | grep cvtsi2sd
+
+; LSR previously eliminated the sitofp by introducing an induction
+; variable which stepped by a bogus ((double)UINT32_C(-1)). It's theoretically
+; possible to eliminate the sitofp using a proper -1.0 step though; this
+; test should be changed if that is done.
+
+define void @foo(i32 %N) nounwind {
+entry:
+ %0 = icmp slt i32 %N, 0 ; [#uses=1]
+ br i1 %0, label %bb, label %return
+
+bb: ; preds = %bb, %entry
+ %i.03 = phi i32 [ 0, %entry ], [ %2, %bb ] ; [#uses=2]
+ %1 = sitofp i32 %i.03 to double ; [#uses=1]
+ tail call void @bar(double %1) nounwind
+ %2 = add nsw i32 %i.03, -1 ; [#uses=2]
+ %exitcond = icmp eq i32 %2, %N ; [#uses=1]
+ br i1 %exitcond, label %return, label %bb
+
+return: ; preds = %bb, %entry
+ ret void
+}
+
+declare void @bar(double)
From sabre at nondot.org Mon Oct 26 10:40:08 2009
From: sabre at nondot.org (Chris Lattner)
Date: Mon, 26 Oct 2009 15:40:08 -0000
Subject: [llvm-commits] [llvm] r85119 - in /llvm/trunk:
lib/Transforms/Scalar/InstructionCombining.cpp
test/Transforms/InstCombine/or.ll
Message-ID: <200910261540.n9QFe8qO019069@zion.cs.uiuc.edu>
Author: lattner
Date: Mon Oct 26 10:40:07 2009
New Revision: 85119
URL: http://llvm.org/viewvc/llvm-project?rev=85119&view=rev
Log:
reapply r85085 with a bugfix to avoid infinite looping.
All of the 'demorgan' related xforms need to use
dyn_castNotVal, not m_Not.
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
llvm/trunk/test/Transforms/InstCombine/or.ll
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=85119&r1=85118&r2=85119&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Mon Oct 26 10:40:07 2009
@@ -631,9 +631,32 @@
return 0;
}
-static inline Value *dyn_castNotVal(Value *V) {
+/// isFreeToInvert - Return true if the specified value is free to invert (apply
+/// ~ to). This happens in cases where the ~ can be eliminated.
+static inline bool isFreeToInvert(Value *V) {
+ // ~(~(X)) -> X.
if (BinaryOperator::isNot(V))
- return BinaryOperator::getNotArgument(V);
+ return true;
+
+ // Constants can be considered to be not'ed values.
+ if (isa(V))
+ return true;
+
+ // Compares can be inverted if they have a single use.
+ if (CmpInst *CI = dyn_cast(V))
+ return CI->hasOneUse();
+
+ return false;
+}
+
+static inline Value *dyn_castNotVal(Value *V) {
+ // If this is not(not(x)) don't return that this is a not: we want the two
+ // not's to be folded first.
+ if (BinaryOperator::isNot(V)) {
+ Value *Operand = BinaryOperator::getNotArgument(V);
+ if (!isFreeToInvert(Operand))
+ return Operand;
+ }
// Constants can be considered to be not'ed values...
if (ConstantInt *C = dyn_cast(V))
@@ -641,6 +664,8 @@
return 0;
}
+
+
// dyn_castFoldableMul - If this value is a multiply that can be folded into
// other computations (because it has a constant operand), return the
// non-constant operand of the multiply, and set CST to point to the multiplier.
@@ -4166,7 +4191,7 @@
if (Instruction *CastOp = dyn_cast(CI->getOperand(0))) {
if ((isa(CI) || isa(CI)) &&
CastOp->getNumOperands() == 2)
- if (ConstantInt *AndCI = dyn_cast(CastOp->getOperand(1))) {
+ if (ConstantInt *AndCI =dyn_cast(CastOp->getOperand(1))){
if (CastOp->getOpcode() == Instruction::And) {
// Change: and (cast (and X, C1) to T), C2
// into : and (cast X to T), trunc_or_bitcast(C1)&C2
@@ -4960,14 +4985,14 @@
if (Ret) return Ret;
}
- if (match(Op0, m_Not(m_Value(A)))) { // ~A | Op1
+ if ((A = dyn_castNotVal(Op0))) { // ~A | Op1
if (A == Op1) // ~A | A == -1
return ReplaceInstUsesWith(I, Constant::getAllOnesValue(I.getType()));
} else {
A = 0;
}
// Note, A is still live here!
- if (match(Op1, m_Not(m_Value(B)))) { // Op0 | ~B
+ if ((B = dyn_castNotVal(Op1))) { // Op0 | ~B
if (Op0 == B)
return ReplaceInstUsesWith(I, Constant::getAllOnesValue(I.getType()));
@@ -5064,12 +5089,13 @@
// Is this a ~ operation?
if (Value *NotOp = dyn_castNotVal(&I)) {
- // ~(~X & Y) --> (X | ~Y) - De Morgan's Law
- // ~(~X | Y) === (X & ~Y) - De Morgan's Law
if (BinaryOperator *Op0I = dyn_cast(NotOp)) {
if (Op0I->getOpcode() == Instruction::And ||
Op0I->getOpcode() == Instruction::Or) {
- if (dyn_castNotVal(Op0I->getOperand(1))) Op0I->swapOperands();
+ // ~(~X & Y) --> (X | ~Y) - De Morgan's Law
+ // ~(~X | Y) === (X & ~Y) - De Morgan's Law
+ if (dyn_castNotVal(Op0I->getOperand(1)))
+ Op0I->swapOperands();
if (Value *Op0NotVal = dyn_castNotVal(Op0I->getOperand(0))) {
Value *NotY =
Builder->CreateNot(Op0I->getOperand(1),
@@ -5078,6 +5104,19 @@
return BinaryOperator::CreateOr(Op0NotVal, NotY);
return BinaryOperator::CreateAnd(Op0NotVal, NotY);
}
+
+ // ~(X & Y) --> (~X | ~Y) - De Morgan's Law
+ // ~(X | Y) === (~X & ~Y) - De Morgan's Law
+ if (isFreeToInvert(Op0I->getOperand(0)) &&
+ isFreeToInvert(Op0I->getOperand(1))) {
+ Value *NotX =
+ Builder->CreateNot(Op0I->getOperand(0), "notlhs");
+ Value *NotY =
+ Builder->CreateNot(Op0I->getOperand(1), "notrhs");
+ if (Op0I->getOpcode() == Instruction::And)
+ return BinaryOperator::CreateOr(NotX, NotY);
+ return BinaryOperator::CreateAnd(NotX, NotY);
+ }
}
}
}
Modified: llvm/trunk/test/Transforms/InstCombine/or.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/InstCombine/or.ll?rev=85119&r1=85118&r2=85119&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/InstCombine/or.ll (original)
+++ llvm/trunk/test/Transforms/InstCombine/or.ll Mon Oct 26 10:40:07 2009
@@ -1,7 +1,6 @@
; This test makes sure that these instructions are properly eliminated.
;
; RUN: opt < %s -instcombine -S | FileCheck %s
-; XFAIL: *
define i32 @test1(i32 %A) {
%B = or i32 %A, 0
From gohman at apple.com Mon Oct 26 10:51:41 2009
From: gohman at apple.com (Dan Gohman)
Date: Mon, 26 Oct 2009 08:51:41 -0700
Subject: [llvm-commits] [llvm] r85017 - in /llvm/trunk/test/Transforms:
Inline/callgraph-update.ll
JumpThreading/no-irreducible-loops.ll LICM/Preserve-LCSSA.ll
LoopRotate/2009-01-25-SingleEntryPhi.ll
LoopRotate/LRCrash-1.ll LoopRotate/LRCrash-2.ll
LoopRotate/LRCrash-3.ll LoopRotate/LRCrash-4.ll
LoopRotate/LRCrash-5.ll LoopRotate/PhiRename-1.ll
LoopRotate/PhiSelfRefernce-1.ll LoopRotate/pr2639.ll
LoopRotate/preserve-scev.ll LoopSimplify/merge-exits.ll
In-Reply-To: <4AE41298.4050102@free.fr>
References: <200910242323.n9ONN5fF025552@zion.cs.uiuc.edu>
<4AE41298.4050102@free.fr>
Message-ID:
On Oct 25, 2009, at 1:55 AM, Duncan Sands wrote:
> Hi Dan,
>
>> Make these tests more interesting by using
>> -verify-dom-info and -verify-loop-info, which enable additional
>> (expensive) consistency checks.
>
> maybe also these checks can be turned on automatically after loop
> passes if LLVM is built with expensive checking turned on. Trying
> to bootstrap gcc with an expensive checks build can be informative :)
These options are already enabled by default in expensive checks builds.
Thanks,
Dan
From gohman at apple.com Mon Oct 26 10:55:25 2009
From: gohman at apple.com (Dan Gohman)
Date: Mon, 26 Oct 2009 15:55:25 -0000
Subject: [llvm-commits] [llvm] r85120 -
/llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
Message-ID: <200910261555.n9QFtPCs020088@zion.cs.uiuc.edu>
Author: djg
Date: Mon Oct 26 10:55:24 2009
New Revision: 85120
URL: http://llvm.org/viewvc/llvm-project?rev=85120&view=rev
Log:
Fix a typo in a comment.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp?rev=85120&r1=85119&r2=85120&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp Mon Oct 26 10:55:24 2009
@@ -211,7 +211,7 @@
for (I = OrigHeader->begin(); PHINode *PN = dyn_cast(I); ++I)
PN->removeIncomingValue(PN->getBasicBlockIndex(OrigPreHeader));
- // Now fix up users of the instructions in OrigHeader, insertting PHI nodes
+ // Now fix up users of the instructions in OrigHeader, inserting PHI nodes
// as necessary.
SSAUpdater SSA;
for (I = OrigHeader->begin(); I != E; ++I) {
From gohman at apple.com Mon Oct 26 10:58:33 2009
From: gohman at apple.com (Dan Gohman)
Date: Mon, 26 Oct 2009 08:58:33 -0700
Subject: [llvm-commits] [llvm] r85016 -
/llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
In-Reply-To: <6FE2703A-1167-451D-B151-E84B042B2378@apple.com>
References: <200910242319.n9ONJrei025407@zion.cs.uiuc.edu>
<6FE2703A-1167-451D-B151-E84B042B2378@apple.com>
Message-ID: <7064681D-2A98-432F-A88E-53E851C2FFF4@apple.com>
On Oct 24, 2009, at 6:20 PM, Chris Lattner wrote:
>
> On Oct 24, 2009, at 4:19 PM, Dan Gohman wrote:
>
>> Author: djg
>> Date: Sat Oct 24 18:19:52 2009
>> New Revision: 85016
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=85016&view=rev
>> Log:
>> Rewrite LoopRotation's SSA updating code using SSAUpdater.
>
> Awesome, I didn't remember loop rotate had its own ssa update code.
>
> If, in your travels, you run into any cases where SSAUpdate is a
> significant compile time issue, please give me a testcase. I have
> many less-than-crazy ideas for speeding it up.
One problem I'm seeing is redundant PHIs. Sphereflake for example
now gets code like this:
%p.013.i = phi %struct.node_t* [ %p.0.be.i, %bb5.backedge.i ],
[ %78, %bb9.i ] ; <%struct.node_t*> [#uses=1]
%p.012.i = phi %struct.node_t* [ %p.0.be.i, %bb5.backedge.i ],
[ %78, %bb9.i ] ; <%struct.node_t*> [#uses=1]
%p.011.i = phi %struct.node_t* [ %p.0.be.i, %bb5.backedge.i ],
[ %78, %bb9.i ] ; <%struct.node_t*> [#uses=1]
%p.010.i = phi %struct.node_t* [ %p.0.be.i, %bb5.backedge.i ],
[ %78, %bb9.i ] ; <%struct.node_t*> [#uses=1]
%p.09.i = phi %struct.node_t* [ %p.0.be.i, %bb5.backedge.i ],
[ %78, %bb9.i ] ; <%struct.node_t*> [#uses=7]
Indvars can't eliminate these because they aren't a function of the
canonical induction variable. These PHIs stick around and end up
being allocated registers, which is suboptimal.
>
>> +
>> + // Now fix up users of the instructions in OrigHeader,
>> insertting PHI nodes
>
> typo insertting.
Fixed.
>
>> + // as necessary.
>> + SSAUpdater SSA;
>> + for (I = OrigHeader->begin(); I != E; ++I) {
>> + Value *OrigHeaderVal = I;
>
> Most instructions only have uses within their block and these don't
> need to be rewritten. It would improve efficiency to do something
> like this if it is safe:
> if (I->hasOneUse() && I->use_back()->getParent() == I &&
> !isa(I->use_back()))
> continue;
The code already avoids calling RewriteUse in these cases. Are you
concerned
about the SSAUpdater::Initialize and AddAvailableValue calls?
Dan
From daniel at zuster.org Mon Oct 26 11:02:25 2009
From: daniel at zuster.org (Daniel Dunbar)
Date: Mon, 26 Oct 2009 09:02:25 -0700
Subject: [llvm-commits] [llvm] r83424 -
/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
In-Reply-To: <200910062226.n96MQgaB016790@zion.cs.uiuc.edu>
References: <200910062226.n96MQgaB016790@zion.cs.uiuc.edu>
Message-ID: <6a8523d60910260902i74d4d85dje53cb78d6f7fa5b@mail.gmail.com>
Hi Kevin,
A few comments inline:
On Tue, Oct 6, 2009 at 3:26 PM, Kevin Enderby wrote:
> Author: enderby
> Date: Tue Oct ?6 17:26:42 2009
> New Revision: 83424
>
> URL: http://llvm.org/viewvc/llvm-project?rev=83424&view=rev
> Log:
> Added bits of the ARM target assembler to llvm-mc to parse some load instruction
> operands. ?Some parsing of arm memory operands for preindexing and postindexing
> forms including with register controled shifts. ?This is a work in progress.
>
> Modified:
> ? ?llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
>
> Modified: llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp?rev=83424&r1=83423&r2=83424&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp (original)
> +++ llvm/trunk/lib/Target/ARM/AsmParser/ARMAsmParser.cpp Tue Oct ?6 17:26:42 2009
> @@ -23,6 +23,15 @@
> ?namespace {
> ?struct ARMOperand;
>
> +// The shift types for register controlled shifts in arm memory addressing
> +enum ShiftType {
> + ?Lsl,
> + ?Lsr,
> + ?Asr,
> + ?Ror,
> + ?Rrx
> +};
> +
> ?class ARMAsmParser : public TargetAsmParser {
> ? MCAsmParser &Parser;
>
> @@ -35,8 +44,31 @@
>
> ? bool Error(SMLoc L, const Twine &Msg) { return Parser.Error(L, Msg); }
>
> + ?bool ParseRegister(ARMOperand &Op);
> +
> + ?bool ParseMemory(ARMOperand &Op);
> +
> + ?bool ParseShift(enum ShiftType *St, const MCExpr *ShiftAmount);
> +
> + ?bool ParseOperand(ARMOperand &Op);
> +
> ? bool ParseDirectiveWord(unsigned Size, SMLoc L);
>
> + ?// TODO - For now hacked versions of the next two are in here in this file to
> + ?// allow some parser testing until the table gen versions are implemented.
> +
> + ?/// @name Auto-generated Match Functions
> + ?/// {
> + ?bool MatchInstruction(SmallVectorImpl &Operands,
> + ? ? ? ? ? ? ? ? ? ? ? ?MCInst &Inst);
> +
> + ?/// MatchRegisterName - Match the given string to a register name, or 0 if
> + ?/// there is no match.
> + ?unsigned MatchRegisterName(const StringRef &Name);
> +
> + ?/// }
> +
> +
> ?public:
> ? ARMAsmParser(const Target &T, MCAsmParser &_Parser)
> ? ? : TargetAsmParser(T), Parser(_Parser) {}
> @@ -48,9 +80,380 @@
>
> ?} // end anonymous namespace
>
> +namespace {
> +
> +/// ARMOperand - Instances of this class represent a parsed ARM machine
> +/// instruction.
> +struct ARMOperand {
> + ?enum {
> + ? ?Token,
> + ? ?Register,
> + ? ?Memory
> + ?} Kind;
> +
> +
> + ?union {
> + ? ?struct {
> + ? ? ?const char *Data;
> + ? ? ?unsigned Length;
> + ? ?} Tok;
> +
> + ? ?struct {
> + ? ? ?unsigned RegNum;
> + ? ?} Reg;
> +
> + ? ?// This is for all forms of ARM address expressions
> + ? ?struct {
> + ? ? ?unsigned BaseRegNum;
> + ? ? ?bool OffsetIsReg;
> + ? ? ?const MCExpr *Offset; // used when OffsetIsReg is false
> + ? ? ?unsigned OffsetRegNum; // used when OffsetIsReg is true
> + ? ? ?bool OffsetRegShifted; // only used when OffsetIsReg is true
> + ? ? ?enum ShiftType ShiftType; ?// used when OffsetRegShifted is true
> + ? ? ?const MCExpr *ShiftAmount; // used when OffsetRegShifted is true
> + ? ? ?bool Preindexed;
> + ? ? ?bool Postindexed;
> + ? ? ?bool Negative; // only used when OffsetIsReg is true
> + ? ? ?bool Writeback;
> + ? ?} Mem;
It probably makes sense to reorder these fields to make the struct
smaller (bool -> 'unsigned foo : 1', and make MCExpr* fields
adjacent).
> +// Try to parse a register name. ?The token must be an Identifier when called,
> +// and if it is a register name a Reg operand is created, the token is eaten
> +// and false is returned. ?Else true is returned and no token is eaten.
> +// TODO this is likely to change to allow different register types and or to
> +// parse for a specific register type.
Please use '///' instead of '//' so the comment gets picked up by
doxygen. This applies in a number of places in this file.
> +bool ARMAsmParser::ParseRegister(ARMOperand &Op) {
> + ?const AsmToken &Tok = getLexer().getTok();
> + ?assert(Tok.is(AsmToken::Identifier) && "Token is not an Identifier");
> +
> + ?// FIXME: Validate register for the current architecture; we have to do
> + ?// validation later, so maybe there is no need for this here.
> + ?unsigned RegNum;
> +
> + ?RegNum = MatchRegisterName(Tok.getString());
> + ?if (RegNum == 0)
> + ? ?return true;
> +
> + ?Op = ARMOperand::CreateReg(RegNum);
> + ?getLexer().Lex(); // Eat identifier token.
> +
> + ?return false;
> +}
Since this is a "try parse" routine, and doesn't emit errors or
consume tokens on failure, it should be called MaybeParseRegister.
> +
> +// Try to parse an arm memory expression. ?It must start with a '[' token.
> +// TODO Only preindexing and postindexing addressing are started, unindexed
> +// with option, etc are still to do.
> +bool ARMAsmParser::ParseMemory(ARMOperand &Op) {
> + ?const AsmToken &LBracTok = getLexer().getTok();
> + ?assert(LBracTok.is(AsmToken::LBrac) && "Token is not an Left Bracket");
> + ?getLexer().Lex(); // Eat left bracket token.
> +
> + ?const AsmToken &BaseRegTok = getLexer().getTok();
> + ?if (BaseRegTok.isNot(AsmToken::Identifier))
> + ? ?return Error(BaseRegTok.getLoc(), "register expected");
> + ?unsigned BaseRegNum = MatchRegisterName(BaseRegTok.getString());
> + ?if (BaseRegNum == 0)
> + ? ?return Error(BaseRegTok.getLoc(), "register expected");
Shouldn't this just call ParseRegister?
> + ?getLexer().Lex(); // Eat identifier token.
> +
> + ?bool Preindexed = false;
> + ?bool Postindexed = false;
> + ?bool OffsetIsReg = false;
> + ?bool Negative = false;
> + ?bool Writeback = false;
> +
> + ?// First look for preindexed address forms:
> + ?// ?[Rn, +/-Rm]
> + ?// ?[Rn, #offset]
> + ?// ?[Rn, +/-Rm, shift]
> + ?// that is after the "[Rn" we now have see if the next token is a comma.
> + ?const AsmToken &Tok = getLexer().getTok();
> + ?if (Tok.is(AsmToken::Comma)) {
> + ? ?Preindexed = true;
> + ? ?getLexer().Lex(); // Eat comma token.
> +
> + ? ?const AsmToken &NextTok = getLexer().getTok();
> + ? ?if (NextTok.is(AsmToken::Plus))
> + ? ? ?getLexer().Lex(); // Eat plus token.
> + ? ?else if (NextTok.is(AsmToken::Minus)) {
> + ? ? ?Negative = true;
> + ? ? ?getLexer().Lex(); // Eat minus token
> + ? ?}
> +
> + ? ?// See if there is a register following the "[Rn," we have so far.
> + ? ?const AsmToken &OffsetRegTok = getLexer().getTok();
> + ? ?unsigned OffsetRegNum = MatchRegisterName(OffsetRegTok.getString());
Again, I think this should just call ParseRegister.
Is a plus/minus not required here? This code will accept [Rn, Rm], is
that intended? If so the comment above listing the forms should be
updated.
> + ? ?bool OffsetRegShifted = false;
> + ? ?enum ShiftType ShiftType;
> + ? ?const MCExpr *ShiftAmount;
> + ? ?const MCExpr *Offset;
> + ? ?if (OffsetRegNum != 0) {
> + ? ? ?OffsetIsReg = true;
> + ? ? ?getLexer().Lex(); // Eat identifier token for the offset register.
> + ? ? ?// Look for a comma then a shift
> + ? ? ?const AsmToken &Tok = getLexer().getTok();
> + ? ? ?if (Tok.is(AsmToken::Comma)) {
> + ? ? ? ?getLexer().Lex(); // Eat comma token.
> +
> + ? ? ? ?const AsmToken &Tok = getLexer().getTok();
> + ? ? ? ?if (ParseShift(&ShiftType, ShiftAmount))
> + ? ? ? ? ?return Error(Tok.getLoc(), "shift expected");
> + ? ? ? ?OffsetRegShifted = true;
> + ? ? ?}
> + ? ?}
> + ? ?else { // "[Rn," we have so far was not followed by "Rm"
> + ? ? ?// Look for #offset following the "[Rn,"
> + ? ? ?const AsmToken &HashTok = getLexer().getTok();
> + ? ? ?if (HashTok.isNot(AsmToken::Hash))
> + ? ? ? ?return Error(HashTok.getLoc(), "'#' expected");
> + ? ? ?getLexer().Lex(); // Eat hash token.
> +
> + ? ? ?if (getParser().ParseExpression(Offset))
> + ? ? ? return true;
> + ? ?}
> + ? ?const AsmToken &RBracTok = getLexer().getTok();
> + ? ?if (RBracTok.isNot(AsmToken::RBrac))
> + ? ? ?return Error(RBracTok.getLoc(), "']' expected");
> + ? ?getLexer().Lex(); // Eat right bracket token.
> +
> + ? ?const AsmToken &ExclaimTok = getLexer().getTok();
> + ? ?if (ExclaimTok.is(AsmToken::Exclaim)) {
> + ? ? ?Writeback = true;
> + ? ? ?getLexer().Lex(); // Eat exclaim token
> + ? ?}
Can you please include an example of this form in the list of forms
this routine is parsing?
> + ? ?Op = ARMOperand::CreateMem(BaseRegNum, OffsetIsReg, Offset, OffsetRegNum,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? OffsetRegShifted, ShiftType, ShiftAmount,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Preindexed, Postindexed, Negative, Writeback);
> + ? ?return false;
> + ?}
> + ?// The "[Rn" we have so far was not followed by a comma.
> + ?else if (Tok.is(AsmToken::RBrac)) {
> + ? ?// This is a post indexing addressing forms:
> + ? ?// ?[Rn], #offset
> + ? ?// ?[Rn], +/-Rm
> + ? ?// ?[Rn], +/-Rm, shift
> + ? ?// that is a ']' follows after the "[Rn".
> + ? ?Postindexed = true;
> + ? ?Writeback = true;
> + ? ?getLexer().Lex(); // Eat right bracket token.
> +
> + ? ?const AsmToken &CommaTok = getLexer().getTok();
> + ? ?if (CommaTok.isNot(AsmToken::Comma))
> + ? ? ?return Error(CommaTok.getLoc(), "',' expected");
> + ? ?getLexer().Lex(); // Eat comma token.
> +
> + ? ?const AsmToken &NextTok = getLexer().getTok();
> + ? ?if (NextTok.is(AsmToken::Plus))
> + ? ? ?getLexer().Lex(); // Eat plus token.
> + ? ?else if (NextTok.is(AsmToken::Minus)) {
> + ? ? ?Negative = true;
> + ? ? ?getLexer().Lex(); // Eat minus token
> + ? ?}
> +
> + ? ?// See if there is a register following the "[Rn]," we have so far.
> + ? ?const AsmToken &OffsetRegTok = getLexer().getTok();
> + ? ?unsigned OffsetRegNum = MatchRegisterName(OffsetRegTok.getString());
> + ? ?bool OffsetRegShifted = false;
> + ? ?enum ShiftType ShiftType;
> + ? ?const MCExpr *ShiftAmount;
> + ? ?const MCExpr *Offset;
> + ? ?if (OffsetRegNum != 0) {
> + ? ? ?OffsetIsReg = true;
> + ? ? ?getLexer().Lex(); // Eat identifier token for the offset register.
> + ? ? ?// Look for a comma then a shift
> + ? ? ?const AsmToken &Tok = getLexer().getTok();
> + ? ? ?if (Tok.is(AsmToken::Comma)) {
> + ? ? ? ?getLexer().Lex(); // Eat comma token.
> +
> + ? ? ? ?const AsmToken &Tok = getLexer().getTok();
> + ? ? ? ?if (ParseShift(&ShiftType, ShiftAmount))
> + ? ? ? ? ?return Error(Tok.getLoc(), "shift expected");
> + ? ? ? ?OffsetRegShifted = true;
> + ? ? ?}
> + ? ?}
> + ? ?else { // "[Rn]," we have so far was not followed by "Rm"
> + ? ? ?// Look for #offset following the "[Rn],"
> + ? ? ?const AsmToken &HashTok = getLexer().getTok();
> + ? ? ?if (HashTok.isNot(AsmToken::Hash))
> + ? ? ? ?return Error(HashTok.getLoc(), "'#' expected");
> + ? ? ?getLexer().Lex(); // Eat hash token.
> +
> + ? ? ?if (getParser().ParseExpression(Offset))
> + ? ? ? return true;
> + ? ?}
> + ? ?Op = ARMOperand::CreateMem(BaseRegNum, OffsetIsReg, Offset, OffsetRegNum,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? OffsetRegShifted, ShiftType, ShiftAmount,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Preindexed, Postindexed, Negative, Writeback);
> + ? ?return false;
> + ?}
> +
> + ?return true;
> +}
I think it might be cleaner to factor this routine into a part that parses:
',' #offset
',' +/-Rm
',' +/-Rm, shift
and then reuse that for both the pre and post indexed forms.
> +/// ParseShift as one of these two:
> +/// ? ( lsl | lsr | asr | ror ) , # shift_amount
> +/// ? rrx
> +/// and returns true if it parses a shift otherwise it returns false.
> +bool ARMAsmParser::ParseShift(ShiftType *St, const MCExpr *ShiftAmount) {
This should take a reference to ShiftType instead of taking a pointer
to it (convention).
> + ?const AsmToken &Tok = getLexer().getTok();
> + ?if (Tok.isNot(AsmToken::Identifier))
> + ? ?return true;
> + ?const StringRef &ShiftName = Tok.getString();
> + ?if (ShiftName == "lsl" || ShiftName == "LSL")
> + ? ?*St = Lsl;
> + ?else if (ShiftName == "lsr" || ShiftName == "LSR")
> + ? ?*St = Lsr;
> + ?else if (ShiftName == "asr" || ShiftName == "ASR")
> + ? ?*St = Asr;
> + ?else if (ShiftName == "ror" || ShiftName == "ROR")
> + ? ?*St = Ror;
> + ?else if (ShiftName == "rrx" || ShiftName == "RRX")
> + ? ?*St = Rrx;
> + ?else
> + ? ?return true;
> + ?getLexer().Lex(); // Eat shift type token.
> +
> + ?// For all but a Rotate right there must be a '#' and a shift amount
> + ?if (*St != Rrx) {
Chris will be happier if you write this as:
--
// Rrx stands alone.
if (*St == Rrx)
return false;
// Otherwise, there must be a '#' and a shift amount.
...
--
to reduce the nesting. :)
> + ? ?// Look for # following the shift type
> + ? ?const AsmToken &HashTok = getLexer().getTok();
> + ? ?if (HashTok.isNot(AsmToken::Hash))
> + ? ? ?return Error(HashTok.getLoc(), "'#' expected");
> + ? ?getLexer().Lex(); // Eat hash token.
> +
> + ? ?if (getParser().ParseExpression(ShiftAmount))
> + ? ? ?return true;
> + ?}
> +
> + ?return false;
> +}
> +
> +// A hack to allow some testing
> +unsigned ARMAsmParser::MatchRegisterName(const StringRef &Name) {
> + ?if (Name == "r1")
> + ? ?return 1;
> + ?else if (Name == "r2")
> + ? ?return 2;
> + ?else if (Name == "r3")
> + ? ?return 3;
> + ?return 0;
> +}
> +
> +// A hack to allow some testing
> +bool ARMAsmParser::MatchInstruction(SmallVectorImpl &Operands,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?MCInst &Inst) {
> + ?struct ARMOperand Op0 = Operands[0];
> + ?assert(Op0.Kind == ARMOperand::Token && "First operand not a Token");
> + ?const StringRef &Mnemonic = Op0.getToken();
> + ?if (Mnemonic == "add" ||
> + ? ? ?Mnemonic == "ldr")
> + ? ?return false;
> +
> + ?return true;
> +}
> +
> +// TODO - this is a work in progress
> +bool ARMAsmParser::ParseOperand(ARMOperand &Op) {
> + ?switch (getLexer().getKind()) {
> + ?case AsmToken::Identifier:
> + ? ?if (!ParseRegister(Op))
> + ? ? ?return false;
> + ? ?// TODO parse other operands that start with an identifier
> + ? ?return true;
> + ?case AsmToken::LBrac:
> + ? ?if (!ParseMemory(Op))
> + ? ? ?return false;
> + ?default:
> + ? ?return true;
> + ?}
> +}
> +
> ?bool ARMAsmParser::ParseInstruction(const StringRef &Name, MCInst &Inst) {
> + ?SmallVector Operands;
> +
> + ?Operands.push_back(ARMOperand::CreateToken(Name));
> +
> ? SMLoc Loc = getLexer().getTok().getLoc();
> - ?Error(Loc, "ARMAsmParser::ParseInstruction currently unimplemented");
> + ?if (getLexer().isNot(AsmToken::EndOfStatement)) {
> +
> + ? ?// Read the first operand.
> + ? ?Operands.push_back(ARMOperand());
> + ? ?if (ParseOperand(Operands.back()))
> + ? ? ?return true;
> +
> + ? ?while (getLexer().is(AsmToken::Comma)) {
> + ? ? ?getLexer().Lex(); ?// Eat the comma.
> +
> + ? ? ?// Parse and remember the operand.
> + ? ? ?Operands.push_back(ARMOperand());
> + ? ? ?if (ParseOperand(Operands.back()))
> + ? ? ? ?return true;
> + ? ?}
> + ?}
> + ?if (!MatchInstruction(Operands, Inst))
> + ? ?return false;
> +
> + ?Error(Loc, "ARMAsmParser::ParseInstruction only partly implemented");
> ? return true;
> ?}
Thanks!
- Daniel
From dpatel at apple.com Mon Oct 26 11:54:36 2009
From: dpatel at apple.com (Devang Patel)
Date: Mon, 26 Oct 2009 16:54:36 -0000
Subject: [llvm-commits] [llvm] r85126 - in /llvm/trunk:
include/llvm/Analysis/DebugInfo.h lib/Analysis/DebugInfo.cpp
Message-ID: <200910261654.n9QGsapO023661@zion.cs.uiuc.edu>
Author: dpatel
Date: Mon Oct 26 11:54:35 2009
New Revision: 85126
URL: http://llvm.org/viewvc/llvm-project?rev=85126&view=rev
Log:
Add support to encode type info using llvm::Constant.
Patch by Talin!
Modified:
llvm/trunk/include/llvm/Analysis/DebugInfo.h
llvm/trunk/lib/Analysis/DebugInfo.cpp
Modified: llvm/trunk/include/llvm/Analysis/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/DebugInfo.h?rev=85126&r1=85125&r2=85126&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/DebugInfo.h Mon Oct 26 11:54:35 2009
@@ -514,6 +514,13 @@
uint64_t OffsetInBits, unsigned Flags,
unsigned Encoding);
+ /// CreateBasicType - Create a basic type like int, float, etc.
+ DIBasicType CreateBasicTypeEx(DIDescriptor Context, StringRef Name,
+ DICompileUnit CompileUnit, unsigned LineNumber,
+ Constant *SizeInBits, Constant *AlignInBits,
+ Constant *OffsetInBits, unsigned Flags,
+ unsigned Encoding);
+
/// CreateDerivedType - Create a derived type like const qualified type,
/// pointer, typedef, etc.
DIDerivedType CreateDerivedType(unsigned Tag, DIDescriptor Context,
@@ -524,6 +531,16 @@
uint64_t OffsetInBits, unsigned Flags,
DIType DerivedFrom);
+ /// CreateDerivedType - Create a derived type like const qualified type,
+ /// pointer, typedef, etc.
+ DIDerivedType CreateDerivedTypeEx(unsigned Tag, DIDescriptor Context,
+ StringRef Name,
+ DICompileUnit CompileUnit,
+ unsigned LineNumber,
+ Constant *SizeInBits, Constant *AlignInBits,
+ Constant *OffsetInBits, unsigned Flags,
+ DIType DerivedFrom);
+
/// CreateCompositeType - Create a composite type like array, struct, etc.
DICompositeType CreateCompositeType(unsigned Tag, DIDescriptor Context,
StringRef Name,
@@ -536,6 +553,18 @@
DIArray Elements,
unsigned RunTimeLang = 0);
+ /// CreateCompositeType - Create a composite type like array, struct, etc.
+ DICompositeType CreateCompositeTypeEx(unsigned Tag, DIDescriptor Context,
+ StringRef Name,
+ DICompileUnit CompileUnit,
+ unsigned LineNumber,
+ Constant *SizeInBits,
+ Constant *AlignInBits,
+ Constant *OffsetInBits, unsigned Flags,
+ DIType DerivedFrom,
+ DIArray Elements,
+ unsigned RunTimeLang = 0);
+
/// CreateSubprogram - Create a new descriptor for the specified subprogram.
/// See comments in DISubprogram for descriptions of these fields.
DISubprogram CreateSubprogram(DIDescriptor Context, StringRef Name,
Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=85126&r1=85125&r2=85126&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/DebugInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/DebugInfo.cpp Mon Oct 26 11:54:35 2009
@@ -695,6 +695,32 @@
return DIBasicType(MDNode::get(VMContext, &Elts[0], 10));
}
+
+/// CreateBasicType - Create a basic type like int, float, etc.
+DIBasicType DIFactory::CreateBasicTypeEx(DIDescriptor Context,
+ StringRef Name,
+ DICompileUnit CompileUnit,
+ unsigned LineNumber,
+ Constant *SizeInBits,
+ Constant *AlignInBits,
+ Constant *OffsetInBits, unsigned Flags,
+ unsigned Encoding) {
+ Value *Elts[] = {
+ GetTagConstant(dwarf::DW_TAG_base_type),
+ Context.getNode(),
+ MDString::get(VMContext, Name),
+ CompileUnit.getNode(),
+ ConstantInt::get(Type::getInt32Ty(VMContext), LineNumber),
+ SizeInBits,
+ AlignInBits,
+ OffsetInBits,
+ ConstantInt::get(Type::getInt32Ty(VMContext), Flags),
+ ConstantInt::get(Type::getInt32Ty(VMContext), Encoding)
+ };
+ return DIBasicType(MDNode::get(VMContext, &Elts[0], 10));
+}
+
+
/// CreateDerivedType - Create a derived type like const qualified type,
/// pointer, typedef, etc.
DIDerivedType DIFactory::CreateDerivedType(unsigned Tag,
@@ -722,6 +748,35 @@
return DIDerivedType(MDNode::get(VMContext, &Elts[0], 10));
}
+
+/// CreateDerivedType - Create a derived type like const qualified type,
+/// pointer, typedef, etc.
+DIDerivedType DIFactory::CreateDerivedTypeEx(unsigned Tag,
+ DIDescriptor Context,
+ StringRef Name,
+ DICompileUnit CompileUnit,
+ unsigned LineNumber,
+ Constant *SizeInBits,
+ Constant *AlignInBits,
+ Constant *OffsetInBits,
+ unsigned Flags,
+ DIType DerivedFrom) {
+ Value *Elts[] = {
+ GetTagConstant(Tag),
+ Context.getNode(),
+ MDString::get(VMContext, Name),
+ CompileUnit.getNode(),
+ ConstantInt::get(Type::getInt32Ty(VMContext), LineNumber),
+ SizeInBits,
+ AlignInBits,
+ OffsetInBits,
+ ConstantInt::get(Type::getInt32Ty(VMContext), Flags),
+ DerivedFrom.getNode(),
+ };
+ return DIDerivedType(MDNode::get(VMContext, &Elts[0], 10));
+}
+
+
/// CreateCompositeType - Create a composite type like array, struct, etc.
DICompositeType DIFactory::CreateCompositeType(unsigned Tag,
DIDescriptor Context,
@@ -754,6 +809,38 @@
}
+/// CreateCompositeType - Create a composite type like array, struct, etc.
+DICompositeType DIFactory::CreateCompositeTypeEx(unsigned Tag,
+ DIDescriptor Context,
+ StringRef Name,
+ DICompileUnit CompileUnit,
+ unsigned LineNumber,
+ Constant *SizeInBits,
+ Constant *AlignInBits,
+ Constant *OffsetInBits,
+ unsigned Flags,
+ DIType DerivedFrom,
+ DIArray Elements,
+ unsigned RuntimeLang) {
+
+ Value *Elts[] = {
+ GetTagConstant(Tag),
+ Context.getNode(),
+ MDString::get(VMContext, Name),
+ CompileUnit.getNode(),
+ ConstantInt::get(Type::getInt32Ty(VMContext), LineNumber),
+ SizeInBits,
+ AlignInBits,
+ OffsetInBits,
+ ConstantInt::get(Type::getInt32Ty(VMContext), Flags),
+ DerivedFrom.getNode(),
+ Elements.getNode(),
+ ConstantInt::get(Type::getInt32Ty(VMContext), RuntimeLang)
+ };
+ return DICompositeType(MDNode::get(VMContext, &Elts[0], 12));
+}
+
+
/// CreateSubprogram - Create a new descriptor for the specified subprogram.
/// See comments in DISubprogram for descriptions of these fields. This
/// method does not unique the generated descriptors.
From david_goodwin at apple.com Mon Oct 26 11:59:04 2009
From: david_goodwin at apple.com (David Goodwin)
Date: Mon, 26 Oct 2009 16:59:04 -0000
Subject: [llvm-commits] [llvm] r85127 - in /llvm/trunk:
include/llvm/CodeGen/AntiDepBreaker.h lib/CodeGen/CMakeLists.txt
lib/CodeGen/CriticalAntiDepBreaker.cpp lib/CodeGen/CriticalAntiDepBreaker.h
lib/CodeGen/PostRASchedulerList.cpp lib/Target/ARM/ARMSubtarget.h
test/CodeGen/X86/break-anti-dependencies.ll
Message-ID: <200910261659.n9QGx4Yj023936@zion.cs.uiuc.edu>
Author: david_goodwin
Date: Mon Oct 26 11:59:04 2009
New Revision: 85127
URL: http://llvm.org/viewvc/llvm-project?rev=85127&view=rev
Log:
Break anti-dependence breaking out into its own class.
Added:
llvm/trunk/include/llvm/CodeGen/AntiDepBreaker.h
llvm/trunk/lib/CodeGen/CriticalAntiDepBreaker.cpp
llvm/trunk/lib/CodeGen/CriticalAntiDepBreaker.h
Modified:
llvm/trunk/lib/CodeGen/CMakeLists.txt
llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
llvm/trunk/lib/Target/ARM/ARMSubtarget.h
llvm/trunk/test/CodeGen/X86/break-anti-dependencies.ll
Added: llvm/trunk/include/llvm/CodeGen/AntiDepBreaker.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AntiDepBreaker.h?rev=85127&view=auto
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/AntiDepBreaker.h (added)
+++ llvm/trunk/include/llvm/CodeGen/AntiDepBreaker.h Mon Oct 26 11:59:04 2009
@@ -0,0 +1,56 @@
+//=- llvm/CodeGen/AntiDepBreaker.h - Anti-Dependence Breaking -*- C++ -*-=//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the AntiDepBreaker class, which implements
+// anti-dependence breaking heuristics for post-register-allocation scheduling.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CODEGEN_ANTIDEPBREAKER_H
+#define LLVM_CODEGEN_ANTIDEPBREAKER_H
+
+#include "llvm/CodeGen/MachineBasicBlock.h"
+#include "llvm/CodeGen/MachineFrameInfo.h"
+#include "llvm/CodeGen/MachineFunction.h"
+#include "llvm/CodeGen/MachineRegisterInfo.h"
+#include "llvm/CodeGen/ScheduleDAG.h"
+#include "llvm/Target/TargetRegisterInfo.h"
+
+namespace llvm {
+
+/// AntiDepBreaker - This class works into conjunction with the
+/// post-RA scheduler to rename registers to break register
+/// anti-dependencies.
+class AntiDepBreaker {
+public:
+ /// Start - Initialize anti-dep breaking for a new basic block.
+ virtual void StartBlock(MachineBasicBlock *BB) =0;
+
+ /// BreakAntiDependencies - Identifiy anti-dependencies within a
+ /// basic-block region and break them by renaming registers. Return
+ /// the number of anti-dependencies broken.
+ ///
+ virtual unsigned BreakAntiDependencies(std::vector& SUnits,
+ MachineBasicBlock::iterator& Begin,
+ MachineBasicBlock::iterator& End,
+ unsigned InsertPosIndex) =0;
+
+ /// Observe - Update liveness information to account for the current
+ /// instruction, which will not be scheduled.
+ ///
+ virtual void Observe(MachineInstr *MI, unsigned Count,
+ unsigned InsertPosIndex) =0;
+
+ /// Finish - Finish anti-dep breaking for a basic block.
+ virtual void FinishBlock() =0;
+};
+
+}
+
+#endif
Modified: llvm/trunk/lib/CodeGen/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CMakeLists.txt?rev=85127&r1=85126&r2=85127&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CMakeLists.txt (original)
+++ llvm/trunk/lib/CodeGen/CMakeLists.txt Mon Oct 26 11:59:04 2009
@@ -1,6 +1,7 @@
add_llvm_library(LLVMCodeGen
BranchFolding.cpp
CodePlacementOpt.cpp
+ CriticalAntiDepBreaker.cpp
DeadMachineInstructionElim.cpp
DwarfEHPrepare.cpp
ELFCodeEmitter.cpp
Added: llvm/trunk/lib/CodeGen/CriticalAntiDepBreaker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CriticalAntiDepBreaker.cpp?rev=85127&view=auto
==============================================================================
--- llvm/trunk/lib/CodeGen/CriticalAntiDepBreaker.cpp (added)
+++ llvm/trunk/lib/CodeGen/CriticalAntiDepBreaker.cpp Mon Oct 26 11:59:04 2009
@@ -0,0 +1,539 @@
+//===----- CriticalAntiDepBreaker.cpp - Anti-dep breaker -------- ---------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the CriticalAntiDepBreaker class, which
+// implements register anti-dependence breaking along a blocks
+// critical path during post-RA scheduler.
+//
+//===----------------------------------------------------------------------===//
+
+#define DEBUG_TYPE "critical-antidep"
+#include "CriticalAntiDepBreaker.h"
+#include "llvm/CodeGen/MachineBasicBlock.h"
+#include "llvm/CodeGen/MachineFrameInfo.h"
+#include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetRegisterInfo.h"
+#include "llvm/Support/Debug.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/raw_ostream.h"
+
+using namespace llvm;
+
+CriticalAntiDepBreaker::
+CriticalAntiDepBreaker(MachineFunction& MFi) :
+ AntiDepBreaker(), MF(MFi),
+ MRI(MF.getRegInfo()),
+ TRI(MF.getTarget().getRegisterInfo()),
+ AllocatableSet(TRI->getAllocatableSet(MF))
+{
+}
+
+CriticalAntiDepBreaker::~CriticalAntiDepBreaker() {
+}
+
+void CriticalAntiDepBreaker::StartBlock(MachineBasicBlock *BB) {
+ // Clear out the register class data.
+ std::fill(Classes, array_endof(Classes),
+ static_cast(0));
+
+ // Initialize the indices to indicate that no registers are live.
+ std::fill(KillIndices, array_endof(KillIndices), ~0u);
+ std::fill(DefIndices, array_endof(DefIndices), BB->size());
+
+ // Clear "do not change" set.
+ KeepRegs.clear();
+
+ bool IsReturnBlock = (!BB->empty() && BB->back().getDesc().isReturn());
+
+ // Determine the live-out physregs for this block.
+ if (IsReturnBlock) {
+ // In a return block, examine the function live-out regs.
+ for (MachineRegisterInfo::liveout_iterator I = MRI.liveout_begin(),
+ E = MRI.liveout_end(); I != E; ++I) {
+ unsigned Reg = *I;
+ Classes[Reg] = reinterpret_cast(-1);
+ KillIndices[Reg] = BB->size();
+ DefIndices[Reg] = ~0u;
+ // Repeat, for all aliases.
+ for (const unsigned *Alias = TRI->getAliasSet(Reg); *Alias; ++Alias) {
+ unsigned AliasReg = *Alias;
+ Classes[AliasReg] = reinterpret_cast(-1);
+ KillIndices[AliasReg] = BB->size();
+ DefIndices[AliasReg] = ~0u;
+ }
+ }
+ } else {
+ // In a non-return block, examine the live-in regs of all successors.
+ for (MachineBasicBlock::succ_iterator SI = BB->succ_begin(),
+ SE = BB->succ_end(); SI != SE; ++SI)
+ for (MachineBasicBlock::livein_iterator I = (*SI)->livein_begin(),
+ E = (*SI)->livein_end(); I != E; ++I) {
+ unsigned Reg = *I;
+ Classes[Reg] = reinterpret_cast(-1);
+ KillIndices[Reg] = BB->size();
+ DefIndices[Reg] = ~0u;
+ // Repeat, for all aliases.
+ for (const unsigned *Alias = TRI->getAliasSet(Reg); *Alias; ++Alias) {
+ unsigned AliasReg = *Alias;
+ Classes[AliasReg] = reinterpret_cast(-1);
+ KillIndices[AliasReg] = BB->size();
+ DefIndices[AliasReg] = ~0u;
+ }
+ }
+ }
+
+ // Mark live-out callee-saved registers. In a return block this is
+ // all callee-saved registers. In non-return this is any
+ // callee-saved register that is not saved in the prolog.
+ const MachineFrameInfo *MFI = MF.getFrameInfo();
+ BitVector Pristine = MFI->getPristineRegs(BB);
+ for (const unsigned *I = TRI->getCalleeSavedRegs(); *I; ++I) {
+ unsigned Reg = *I;
+ if (!IsReturnBlock && !Pristine.test(Reg)) continue;
+ Classes[Reg] = reinterpret_cast(-1);
+ KillIndices[Reg] = BB->size();
+ DefIndices[Reg] = ~0u;
+ // Repeat, for all aliases.
+ for (const unsigned *Alias = TRI->getAliasSet(Reg); *Alias; ++Alias) {
+ unsigned AliasReg = *Alias;
+ Classes[AliasReg] = reinterpret_cast(-1);
+ KillIndices[AliasReg] = BB->size();
+ DefIndices[AliasReg] = ~0u;
+ }
+ }
+}
+
+void CriticalAntiDepBreaker::FinishBlock() {
+ RegRefs.clear();
+ KeepRegs.clear();
+}
+
+void CriticalAntiDepBreaker::Observe(MachineInstr *MI, unsigned Count,
+ unsigned InsertPosIndex) {
+ assert(Count < InsertPosIndex && "Instruction index out of expected range!");
+
+ // Any register which was defined within the previous scheduling region
+ // may have been rescheduled and its lifetime may overlap with registers
+ // in ways not reflected in our current liveness state. For each such
+ // register, adjust the liveness state to be conservatively correct.
+ for (unsigned Reg = 0; Reg != TargetRegisterInfo::FirstVirtualRegister; ++Reg)
+ if (DefIndices[Reg] < InsertPosIndex && DefIndices[Reg] >= Count) {
+ assert(KillIndices[Reg] == ~0u && "Clobbered register is live!");
+ // Mark this register to be non-renamable.
+ Classes[Reg] = reinterpret_cast(-1);
+ // Move the def index to the end of the previous region, to reflect
+ // that the def could theoretically have been scheduled at the end.
+ DefIndices[Reg] = InsertPosIndex;
+ }
+
+ PrescanInstruction(MI);
+ ScanInstruction(MI, Count);
+}
+
+/// CriticalPathStep - Return the next SUnit after SU on the bottom-up
+/// critical path.
+static SDep *CriticalPathStep(SUnit *SU) {
+ SDep *Next = 0;
+ unsigned NextDepth = 0;
+ // Find the predecessor edge with the greatest depth.
+ for (SUnit::pred_iterator P = SU->Preds.begin(), PE = SU->Preds.end();
+ P != PE; ++P) {
+ SUnit *PredSU = P->getSUnit();
+ unsigned PredLatency = P->getLatency();
+ unsigned PredTotalLatency = PredSU->getDepth() + PredLatency;
+ // In the case of a latency tie, prefer an anti-dependency edge over
+ // other types of edges.
+ if (NextDepth < PredTotalLatency ||
+ (NextDepth == PredTotalLatency && P->getKind() == SDep::Anti)) {
+ NextDepth = PredTotalLatency;
+ Next = &*P;
+ }
+ }
+ return Next;
+}
+
+void CriticalAntiDepBreaker::PrescanInstruction(MachineInstr *MI) {
+ // Scan the register operands for this instruction and update
+ // Classes and RegRefs.
+ for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
+ MachineOperand &MO = MI->getOperand(i);
+ if (!MO.isReg()) continue;
+ unsigned Reg = MO.getReg();
+ if (Reg == 0) continue;
+ const TargetRegisterClass *NewRC = 0;
+
+ if (i < MI->getDesc().getNumOperands())
+ NewRC = MI->getDesc().OpInfo[i].getRegClass(TRI);
+
+ // For now, only allow the register to be changed if its register
+ // class is consistent across all uses.
+ if (!Classes[Reg] && NewRC)
+ Classes[Reg] = NewRC;
+ else if (!NewRC || Classes[Reg] != NewRC)
+ Classes[Reg] = reinterpret_cast(-1);
+
+ // Now check for aliases.
+ for (const unsigned *Alias = TRI->getAliasSet(Reg); *Alias; ++Alias) {
+ // If an alias of the reg is used during the live range, give up.
+ // Note that this allows us to skip checking if AntiDepReg
+ // overlaps with any of the aliases, among other things.
+ unsigned AliasReg = *Alias;
+ if (Classes[AliasReg]) {
+ Classes[AliasReg] = reinterpret_cast(-1);
+ Classes[Reg] = reinterpret_cast(-1);
+ }
+ }
+
+ // If we're still willing to consider this register, note the reference.
+ if (Classes[Reg] != reinterpret_cast(-1))
+ RegRefs.insert(std::make_pair(Reg, &MO));
+
+ // It's not safe to change register allocation for source operands of
+ // that have special allocation requirements.
+ if (MO.isUse() && MI->getDesc().hasExtraSrcRegAllocReq()) {
+ if (KeepRegs.insert(Reg)) {
+ for (const unsigned *Subreg = TRI->getSubRegisters(Reg);
+ *Subreg; ++Subreg)
+ KeepRegs.insert(*Subreg);
+ }
+ }
+ }
+}
+
+void CriticalAntiDepBreaker::ScanInstruction(MachineInstr *MI,
+ unsigned Count) {
+ // Update liveness.
+ // Proceding upwards, registers that are defed but not used in this
+ // instruction are now dead.
+ for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
+ MachineOperand &MO = MI->getOperand(i);
+ if (!MO.isReg()) continue;
+ unsigned Reg = MO.getReg();
+ if (Reg == 0) continue;
+ if (!MO.isDef()) continue;
+ // Ignore two-addr defs.
+ if (MI->isRegTiedToUseOperand(i)) continue;
+
+ DefIndices[Reg] = Count;
+ KillIndices[Reg] = ~0u;
+ assert(((KillIndices[Reg] == ~0u) !=
+ (DefIndices[Reg] == ~0u)) &&
+ "Kill and Def maps aren't consistent for Reg!");
+ KeepRegs.erase(Reg);
+ Classes[Reg] = 0;
+ RegRefs.erase(Reg);
+ // Repeat, for all subregs.
+ for (const unsigned *Subreg = TRI->getSubRegisters(Reg);
+ *Subreg; ++Subreg) {
+ unsigned SubregReg = *Subreg;
+ DefIndices[SubregReg] = Count;
+ KillIndices[SubregReg] = ~0u;
+ KeepRegs.erase(SubregReg);
+ Classes[SubregReg] = 0;
+ RegRefs.erase(SubregReg);
+ }
+ // Conservatively mark super-registers as unusable.
+ for (const unsigned *Super = TRI->getSuperRegisters(Reg);
+ *Super; ++Super) {
+ unsigned SuperReg = *Super;
+ Classes[SuperReg] = reinterpret_cast(-1);
+ }
+ }
+ for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
+ MachineOperand &MO = MI->getOperand(i);
+ if (!MO.isReg()) continue;
+ unsigned Reg = MO.getReg();
+ if (Reg == 0) continue;
+ if (!MO.isUse()) continue;
+
+ const TargetRegisterClass *NewRC = 0;
+ if (i < MI->getDesc().getNumOperands())
+ NewRC = MI->getDesc().OpInfo[i].getRegClass(TRI);
+
+ // For now, only allow the register to be changed if its register
+ // class is consistent across all uses.
+ if (!Classes[Reg] && NewRC)
+ Classes[Reg] = NewRC;
+ else if (!NewRC || Classes[Reg] != NewRC)
+ Classes[Reg] = reinterpret_cast(-1);
+
+ RegRefs.insert(std::make_pair(Reg, &MO));
+
+ // It wasn't previously live but now it is, this is a kill.
+ if (KillIndices[Reg] == ~0u) {
+ KillIndices[Reg] = Count;
+ DefIndices[Reg] = ~0u;
+ assert(((KillIndices[Reg] == ~0u) !=
+ (DefIndices[Reg] == ~0u)) &&
+ "Kill and Def maps aren't consistent for Reg!");
+ }
+ // Repeat, for all aliases.
+ for (const unsigned *Alias = TRI->getAliasSet(Reg); *Alias; ++Alias) {
+ unsigned AliasReg = *Alias;
+ if (KillIndices[AliasReg] == ~0u) {
+ KillIndices[AliasReg] = Count;
+ DefIndices[AliasReg] = ~0u;
+ }
+ }
+ }
+}
+
+unsigned
+CriticalAntiDepBreaker::findSuitableFreeRegister(unsigned AntiDepReg,
+ unsigned LastNewReg,
+ const TargetRegisterClass *RC) {
+ for (TargetRegisterClass::iterator R = RC->allocation_order_begin(MF),
+ RE = RC->allocation_order_end(MF); R != RE; ++R) {
+ unsigned NewReg = *R;
+ // Don't replace a register with itself.
+ if (NewReg == AntiDepReg) continue;
+ // Don't replace a register with one that was recently used to repair
+ // an anti-dependence with this AntiDepReg, because that would
+ // re-introduce that anti-dependence.
+ if (NewReg == LastNewReg) continue;
+ // If NewReg is dead and NewReg's most recent def is not before
+ // AntiDepReg's kill, it's safe to replace AntiDepReg with NewReg.
+ assert(((KillIndices[AntiDepReg] == ~0u) != (DefIndices[AntiDepReg] == ~0u)) &&
+ "Kill and Def maps aren't consistent for AntiDepReg!");
+ assert(((KillIndices[NewReg] == ~0u) != (DefIndices[NewReg] == ~0u)) &&
+ "Kill and Def maps aren't consistent for NewReg!");
+ if (KillIndices[NewReg] != ~0u ||
+ Classes[NewReg] == reinterpret_cast(-1) ||
+ KillIndices[AntiDepReg] > DefIndices[NewReg])
+ continue;
+ return NewReg;
+ }
+
+ // No registers are free and available!
+ return 0;
+}
+
+unsigned CriticalAntiDepBreaker::
+BreakAntiDependencies(std::vector& SUnits,
+ MachineBasicBlock::iterator& Begin,
+ MachineBasicBlock::iterator& End,
+ unsigned InsertPosIndex) {
+ // The code below assumes that there is at least one instruction,
+ // so just duck out immediately if the block is empty.
+ if (SUnits.empty()) return 0;
+
+ // Find the node at the bottom of the critical path.
+ SUnit *Max = 0;
+ for (unsigned i = 0, e = SUnits.size(); i != e; ++i) {
+ SUnit *SU = &SUnits[i];
+ if (!Max || SU->getDepth() + SU->Latency > Max->getDepth() + Max->Latency)
+ Max = SU;
+ }
+
+#ifndef NDEBUG
+ {
+ DEBUG(errs() << "Critical path has total latency "
+ << (Max->getDepth() + Max->Latency) << "\n");
+ DEBUG(errs() << "Available regs:");
+ for (unsigned Reg = 0; Reg < TRI->getNumRegs(); ++Reg) {
+ if (KillIndices[Reg] == ~0u)
+ DEBUG(errs() << " " << TRI->getName(Reg));
+ }
+ DEBUG(errs() << '\n');
+ }
+#endif
+
+ // Track progress along the critical path through the SUnit graph as we walk
+ // the instructions.
+ SUnit *CriticalPathSU = Max;
+ MachineInstr *CriticalPathMI = CriticalPathSU->getInstr();
+
+ // Consider this pattern:
+ // A = ...
+ // ... = A
+ // A = ...
+ // ... = A
+ // A = ...
+ // ... = A
+ // A = ...
+ // ... = A
+ // There are three anti-dependencies here, and without special care,
+ // we'd break all of them using the same register:
+ // A = ...
+ // ... = A
+ // B = ...
+ // ... = B
+ // B = ...
+ // ... = B
+ // B = ...
+ // ... = B
+ // because at each anti-dependence, B is the first register that
+ // isn't A which is free. This re-introduces anti-dependencies
+ // at all but one of the original anti-dependencies that we were
+ // trying to break. To avoid this, keep track of the most recent
+ // register that each register was replaced with, avoid
+ // using it to repair an anti-dependence on the same register.
+ // This lets us produce this:
+ // A = ...
+ // ... = A
+ // B = ...
+ // ... = B
+ // C = ...
+ // ... = C
+ // B = ...
+ // ... = B
+ // This still has an anti-dependence on B, but at least it isn't on the
+ // original critical path.
+ //
+ // TODO: If we tracked more than one register here, we could potentially
+ // fix that remaining critical edge too. This is a little more involved,
+ // because unlike the most recent register, less recent registers should
+ // still be considered, though only if no other registers are available.
+ unsigned LastNewReg[TargetRegisterInfo::FirstVirtualRegister] = {};
+
+ // Attempt to break anti-dependence edges on the critical path. Walk the
+ // instructions from the bottom up, tracking information about liveness
+ // as we go to help determine which registers are available.
+ unsigned Broken = 0;
+ unsigned Count = InsertPosIndex - 1;
+ for (MachineBasicBlock::iterator I = End, E = Begin;
+ I != E; --Count) {
+ MachineInstr *MI = --I;
+
+ // Check if this instruction has a dependence on the critical path that
+ // is an anti-dependence that we may be able to break. If it is, set
+ // AntiDepReg to the non-zero register associated with the anti-dependence.
+ //
+ // We limit our attention to the critical path as a heuristic to avoid
+ // breaking anti-dependence edges that aren't going to significantly
+ // impact the overall schedule. There are a limited number of registers
+ // and we want to save them for the important edges.
+ //
+ // TODO: Instructions with multiple defs could have multiple
+ // anti-dependencies. The current code here only knows how to break one
+ // edge per instruction. Note that we'd have to be able to break all of
+ // the anti-dependencies in an instruction in order to be effective.
+ unsigned AntiDepReg = 0;
+ if (MI == CriticalPathMI) {
+ if (SDep *Edge = CriticalPathStep(CriticalPathSU)) {
+ SUnit *NextSU = Edge->getSUnit();
+
+ // Only consider anti-dependence edges.
+ if (Edge->getKind() == SDep::Anti) {
+ AntiDepReg = Edge->getReg();
+ assert(AntiDepReg != 0 && "Anti-dependence on reg0?");
+ if (!AllocatableSet.test(AntiDepReg))
+ // Don't break anti-dependencies on non-allocatable registers.
+ AntiDepReg = 0;
+ else if (KeepRegs.count(AntiDepReg))
+ // Don't break anti-dependencies if an use down below requires
+ // this exact register.
+ AntiDepReg = 0;
+ else {
+ // If the SUnit has other dependencies on the SUnit that it
+ // anti-depends on, don't bother breaking the anti-dependency
+ // since those edges would prevent such units from being
+ // scheduled past each other regardless.
+ //
+ // Also, if there are dependencies on other SUnits with the
+ // same register as the anti-dependency, don't attempt to
+ // break it.
+ for (SUnit::pred_iterator P = CriticalPathSU->Preds.begin(),
+ PE = CriticalPathSU->Preds.end(); P != PE; ++P)
+ if (P->getSUnit() == NextSU ?
+ (P->getKind() != SDep::Anti || P->getReg() != AntiDepReg) :
+ (P->getKind() == SDep::Data && P->getReg() == AntiDepReg)) {
+ AntiDepReg = 0;
+ break;
+ }
+ }
+ }
+ CriticalPathSU = NextSU;
+ CriticalPathMI = CriticalPathSU->getInstr();
+ } else {
+ // We've reached the end of the critical path.
+ CriticalPathSU = 0;
+ CriticalPathMI = 0;
+ }
+ }
+
+ PrescanInstruction(MI);
+
+ if (MI->getDesc().hasExtraDefRegAllocReq())
+ // If this instruction's defs have special allocation requirement, don't
+ // break this anti-dependency.
+ AntiDepReg = 0;
+ else if (AntiDepReg) {
+ // If this instruction has a use of AntiDepReg, breaking it
+ // is invalid.
+ for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
+ MachineOperand &MO = MI->getOperand(i);
+ if (!MO.isReg()) continue;
+ unsigned Reg = MO.getReg();
+ if (Reg == 0) continue;
+ if (MO.isUse() && AntiDepReg == Reg) {
+ AntiDepReg = 0;
+ break;
+ }
+ }
+ }
+
+ // Determine AntiDepReg's register class, if it is live and is
+ // consistently used within a single class.
+ const TargetRegisterClass *RC = AntiDepReg != 0 ? Classes[AntiDepReg] : 0;
+ assert((AntiDepReg == 0 || RC != NULL) &&
+ "Register should be live if it's causing an anti-dependence!");
+ if (RC == reinterpret_cast(-1))
+ AntiDepReg = 0;
+
+ // Look for a suitable register to use to break the anti-depenence.
+ //
+ // TODO: Instead of picking the first free register, consider which might
+ // be the best.
+ if (AntiDepReg != 0) {
+ if (unsigned NewReg = findSuitableFreeRegister(AntiDepReg,
+ LastNewReg[AntiDepReg],
+ RC)) {
+ DEBUG(errs() << "Breaking anti-dependence edge on "
+ << TRI->getName(AntiDepReg)
+ << " with " << RegRefs.count(AntiDepReg) << " references"
+ << " using " << TRI->getName(NewReg) << "!\n");
+
+ // Update the references to the old register to refer to the new
+ // register.
+ std::pair::iterator,
+ std::multimap::iterator>
+ Range = RegRefs.equal_range(AntiDepReg);
+ for (std::multimap::iterator
+ Q = Range.first, QE = Range.second; Q != QE; ++Q)
+ Q->second->setReg(NewReg);
+
+ // We just went back in time and modified history; the
+ // liveness information for the anti-depenence reg is now
+ // inconsistent. Set the state as if it were dead.
+ Classes[NewReg] = Classes[AntiDepReg];
+ DefIndices[NewReg] = DefIndices[AntiDepReg];
+ KillIndices[NewReg] = KillIndices[AntiDepReg];
+ assert(((KillIndices[NewReg] == ~0u) !=
+ (DefIndices[NewReg] == ~0u)) &&
+ "Kill and Def maps aren't consistent for NewReg!");
+
+ Classes[AntiDepReg] = 0;
+ DefIndices[AntiDepReg] = KillIndices[AntiDepReg];
+ KillIndices[AntiDepReg] = ~0u;
+ assert(((KillIndices[AntiDepReg] == ~0u) !=
+ (DefIndices[AntiDepReg] == ~0u)) &&
+ "Kill and Def maps aren't consistent for AntiDepReg!");
+
+ RegRefs.erase(AntiDepReg);
+ LastNewReg[AntiDepReg] = NewReg;
+ ++Broken;
+ }
+ }
+
+ ScanInstruction(MI, Count);
+ }
+
+ return Broken;
+}
Added: llvm/trunk/lib/CodeGen/CriticalAntiDepBreaker.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CriticalAntiDepBreaker.h?rev=85127&view=auto
==============================================================================
--- llvm/trunk/lib/CodeGen/CriticalAntiDepBreaker.h (added)
+++ llvm/trunk/lib/CodeGen/CriticalAntiDepBreaker.h Mon Oct 26 11:59:04 2009
@@ -0,0 +1,95 @@
+//=- llvm/CodeGen/CriticalAntiDepBreaker.h - Anti-Dep Support -*- C++ -*-=//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file implements the CriticalAntiDepBreaker class, which
+// implements register anti-dependence breaking along a blocks
+// critical path during post-RA scheduler.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CODEGEN_CRITICALANTIDEPBREAKER_H
+#define LLVM_CODEGEN_CRITICALANTIDEPBREAKER_H
+
+#include "llvm/CodeGen/AntiDepBreaker.h"
+#include "llvm/CodeGen/MachineBasicBlock.h"
+#include "llvm/CodeGen/MachineFrameInfo.h"
+#include "llvm/CodeGen/MachineFunction.h"
+#include "llvm/CodeGen/MachineRegisterInfo.h"
+#include "llvm/CodeGen/ScheduleDAG.h"
+#include "llvm/Target/TargetRegisterInfo.h"
+#include "llvm/ADT/BitVector.h"
+#include "llvm/ADT/SmallSet.h"
+
+namespace llvm {
+ class CriticalAntiDepBreaker : public AntiDepBreaker {
+ MachineFunction& MF;
+ MachineRegisterInfo &MRI;
+ const TargetRegisterInfo *TRI;
+
+ /// AllocatableSet - The set of allocatable registers.
+ /// We'll be ignoring anti-dependencies on non-allocatable registers,
+ /// because they may not be safe to break.
+ const BitVector AllocatableSet;
+
+ /// Classes - For live regs that are only used in one register class in a
+ /// live range, the register class. If the register is not live, the
+ /// corresponding value is null. If the register is live but used in
+ /// multiple register classes, the corresponding value is -1 casted to a
+ /// pointer.
+ const TargetRegisterClass *
+ Classes[TargetRegisterInfo::FirstVirtualRegister];
+
+ /// RegRegs - Map registers to all their references within a live range.
+ std::multimap RegRefs;
+
+ /// KillIndices - The index of the most recent kill (proceding bottom-up),
+ /// or ~0u if the register is not live.
+ unsigned KillIndices[TargetRegisterInfo::FirstVirtualRegister];
+
+ /// DefIndices - The index of the most recent complete def (proceding bottom
+ /// up), or ~0u if the register is live.
+ unsigned DefIndices[TargetRegisterInfo::FirstVirtualRegister];
+
+ /// KeepRegs - A set of registers which are live and cannot be changed to
+ /// break anti-dependencies.
+ SmallSet KeepRegs;
+
+ public:
+ CriticalAntiDepBreaker(MachineFunction& MFi);
+ ~CriticalAntiDepBreaker();
+
+ /// Start - Initialize anti-dep breaking for a new basic block.
+ void StartBlock(MachineBasicBlock *BB);
+
+ /// BreakAntiDependencies - Identifiy anti-dependencies along the critical path
+ /// of the ScheduleDAG and break them by renaming registers.
+ ///
+ unsigned BreakAntiDependencies(std::vector& SUnits,
+ MachineBasicBlock::iterator& Begin,
+ MachineBasicBlock::iterator& End,
+ unsigned InsertPosIndex);
+
+ /// Observe - Update liveness information to account for the current
+ /// instruction, which will not be scheduled.
+ ///
+ void Observe(MachineInstr *MI, unsigned Count, unsigned InsertPosIndex);
+
+ /// Finish - Finish anti-dep breaking for a basic block.
+ void FinishBlock();
+
+ private:
+ void PrescanInstruction(MachineInstr *MI);
+ void ScanInstruction(MachineInstr *MI, unsigned Count);
+ unsigned findSuitableFreeRegister(unsigned AntiDepReg,
+ unsigned LastNewReg,
+ const TargetRegisterClass *);
+ };
+}
+
+#endif
Modified: llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp?rev=85127&r1=85126&r2=85127&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp (original)
+++ llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp Mon Oct 26 11:59:04 2009
@@ -19,6 +19,7 @@
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "post-RA-sched"
+#include "CriticalAntiDepBreaker.h"
#include "ExactHazardRecognizer.h"
#include "SimpleHazardRecognizer.h"
#include "ScheduleDAGInstrs.h"
@@ -40,6 +41,7 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/Statistic.h"
#include