JP4231516B2 - 実行コードの生成方法及びプログラム - Google Patents
実行コードの生成方法及びプログラム Download PDFInfo
- Publication number
- JP4231516B2 JP4231516B2 JP2006213342A JP2006213342A JP4231516B2 JP 4231516 B2 JP4231516 B2 JP 4231516B2 JP 2006213342 A JP2006213342 A JP 2006213342A JP 2006213342 A JP2006213342 A JP 2006213342A JP 4231516 B2 JP4231516 B2 JP 4231516B2
- Authority
- JP
- Japan
- Prior art keywords
- intermediate code
- code
- cpu
- computer
- cache memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/32—Means for saving power
- G06F1/3203—Power management, i.e. event-based initiation of a power-saving mode
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/44—Encoding
- G06F8/443—Optimisation
- G06F8/4432—Reducing the energy consumption
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Devices For Executing Special Programs (AREA)
- Power Sources (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Description
CPU負荷比率=メモリアクセス量(サイクル数)/演算量
としてもよい。なお、メモリアクセス量のサイクル数への変換は、主記憶15の転送レートからメモリアクセス量(バイト数)に応じた時間を求め、この時間をCPU11の最大動作周波数からサイクル数へ変換すればよい。
図12、図13は第2の実施形態を示し、前記第1実施形態のCPU11が3次キャッシュメモリ17を備える例を示す。
図14は、第3の実施形態を示し、前記第1実施形態の低電力化コード生成モジュール400をコンパイラに組み込んだもので、その他の構成は前記第1実施形態と同様である。
14 2次キャッシュメモリ14
50 ソースプログラム
200 コンパイラ
300 最適化コード
400 低電力化コード生成モジュール
500 ロードモジュール
Claims (10)
- 低電力化機能を有するCPUと、キャッシュメモリ及び主記憶を含む計算機で実行する実行コードに、前記CPUの低電力化機能を有効にする低電力化コードを付加する実行コードの生成方法であって、
前記計算機が、ソースコードから生成された中間コードを読み込む手順と、
前記計算機が、前記読み込んだ中間コードを解析して前記中間コードに対応する命令を前記CPUで演算するときのサイクル数を第1のサイクル数として求める手順と、
前記計算機が、前記読み込んだ中間コードを解析して前記中間コードに対応する命令を前記CPUで実行したときに前記キャッシュメモリにアクセスする命令の数と、前記CPUがキャッシュメモリに読み書きするデータ量に前記命令の数を乗じてメモリアクセス量を求め、前記メモリアクセス量を前記CPUのサイクル数に変換して第2のサイクル数として演算する手順と、
前記計算機が、前記第1のサイクル数と第2のサイクル数の比率をCPU負荷比率として求める手順と、
前記計算機が、前記中間コードのうち、前記CPU負荷比率が所定の値以下となる領域を判定する手順と、
前記計算機が前記前記CPU負荷比率が所定の値以下と判定された前記領域に、前記低電力化機能を有効にする低電力化コードを前記中間コードに付加する手順と、
前記中間コードから前記計算機で実行可能な中間コードを生成する手順と、
を含むことを特徴とする中間コードの生成方法。 - 前記低電力化機能を有効にする低電力化コードを前記中間コードに付加する手順は、
前記CPU負荷比率に比例してCPUの動作周波数または動作電圧を段階的に求める手順と、
前記求めた動作周波数または動作電圧を設定する低電力化コードを前記中間コードに付加する手順と、
を含むことを特徴とする請求項1に記載の中間コードの生成方法。 - 前記計算機が、前記中間コードのうちループ演算を含む範囲を対象領域として抽出し、当該抽出した対象領域を分割する手順をさらに含み、
前記計算機が、前記中間コードを読み込んで、当該中間コードに対応する命令を前記CPUで演算するときのサイクル数を第1のサイクル数として求める手順は、
前記分割された対象領域を読み込んで、前記対象領域に含まれる命令を前記CPUで演算するときのサイクル数を第1のサイクル数として求め、
前記計算機が前記読み込んだ中間コードを解析してキャッシュメモリにアクセスする命令の数と、前記CPUがキャッシュメモリに読み書きするデータ量に前記命令の数を乗じてメモリアクセス量を求め、前記メモリアクセス量を前記CPUのサイクル数に変換して第2のサイクル数として演算する手順は、
前記分割された対象領域を読み込んで、前記対象領域を解析してキャッシュメモリにアクセスする命令の数と、前記CPUがキャッシュメモリに読み書するデータ量に前記命令の数を乗じてメモリアクセス量を求め、前記メモリアクセス量を前記CPUのサイクル数に変換して第2のサイクル数として演算することを特徴とする請求項1に記載の中間コードの生成方法。 - 前記計算機は、前記中間コードに対応する命令を並列的に実行する複数のノードを備え、
前記計算機が、前記中間コードのうちループ演算を含む範囲を対象領域として抽出し、当該抽出した対象領域を分割する手順は、
前記中間コードに含まれる命令を並列的に実行するときに指定される前記ノードの数と、前記ループ回数から、前記対象領域を前記ノードの数で分割し、当該分割後の対象領域のループ演算の回数として前記指定されたループ回数を前記ノードの数で除した値に設定することを特徴とする請求項3に記載の中間コードの生成方法。 - 前記低電力化機能を有効にする低電力化コードを前記中間コードに付加する手順は、
前記中間コードに対応する命令の実行時に、前記対象領域のループ演算の回数と前記ノードの数の比が所定の条件を満たしたときに低電力化機能を有効にする低電力化コードを実行する条件分岐命令を付加する手順を含むことを特徴とする請求項4に記載の中間コードの生成方法。 - 低電力化機能を有するCPUと、キャッシュメモリ及び主記憶を含む計算機で実行する中間コードに、前記CPUの低電力化機能を有効にするコードを付加するプログラムであって、
ソースコードから生成された中間コードを読み込む処理と、
前記読み込んだ中間コードを解析して前記中間コードに対応する命令を前記CPUで演算するときのサイクル数を第1のサイクル数として求める処理と、
前記読み込んだ中間コードを解析して前記中間コードに対応する命令を前記CPUで実行したときに前記キャッシュメモリにアクセスする命令の数と、前記CPUがキャッシュメモリに読み書きするデータ量に前記命令の数を乗じてメモリアクセス量を求め、前記メモリアクセス量を前記CPUのサイクル数に変換して第2のサイクル数として演算する処理と、
前記第1のサイクル数と第2のサイクル数の比率をCPU負荷比率として求める処理と、
前記前記CPU負荷比率が所定の値以下と判定された前記領域に、前記低電力化機能を有効にする低電力化コードを前記中間コードに付加する処理と、
前記中間コードから前記計算機で実行可能な中間コードを生成する処理と、
を前記計算機に実行させることを特徴とするプログラム。 - 前記低電力化機能を有効にする低電力化コードを前記中間コードに付加する処理は、
前記CPU負荷比率に比例してCPUの動作周波数または動作電圧を段階的に求める処理と、
前記求めた動作周波数または動作電圧を設定する低電力化コードを前記中間コードに付加する処理と、
を含むことを特徴とする請求項6に記載のプログラム。 - 前記中間コードのうちループ演算を含む範囲を対象領域として抽出し、当該抽出した対象領域を分割する処理をさらに含み、
前記中間コードを読み込んで、当該中間コードに対応する命令を前記CPUで演算するときのサイクル数を第1のサイクル数として求める処理は、
前記分割された対象領域を読み込んで、前記対象領域に含まれる命令を前記CPUで演算するときのサイクル数を第1のサイクル数として求め、
前記読み込んだ中間コードを解析してキャッシュメモリにアクセスする命令の数と、前記CPUがキャッシュメモリに読み書きするデータ量に前記命令の数を乗じてメモリアクセス量を求め、前記メモリアクセス量を前記CPUのサイクル数に変換して第2のサイクル数として演算する処理は、
前記分割された対象領域を読み込んで、前記対象領域を解析してキャッシュメモリにアクセスする命令の数と、前記CPUがキャッシュメモリ読み書きするデータ量に前記命令の数を乗じてメモリアクセス量を求め、前記メモリアクセス量を前記CPUのサイクル数に変換して第2のサイクル数として演算することを特徴とする請求項6に記載のプログラム。 - 前記計算機は、前記中間コードに対応する命令を並列的に実行する複数のノードを備え、
前記中間コードのうちループ演算を含む範囲を対象領域として抽出し、当該抽出した対象領域を分割する処理は、
前記中間コードに対応する命令を並列的に実行するときに指定される前記ノードの数と、前記ループ回数から、前記対象領域を前記ノードの数で分割し、当該分割後の対象領域のループ演算の回数として前記指定されたループ回数を前記ノードの数で除した値に設定することを特徴とする請求項8に記載のプログラム。 - 前記低電力化機能を有効にする低電力化コードを前記中間コードに付加する処理は、
前記中間コードに対応する命令の実行時に、前記対象領域のループ演算の回数と前記ノードの数の比が所定の条件を満たしたときに低電力化機能を有効にする低電力化コードを実行する条件分岐命令を付加する処理を含むことを特徴とする請求項9に記載のプログラム。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006213342A JP4231516B2 (ja) | 2006-08-04 | 2006-08-04 | 実行コードの生成方法及びプログラム |
US11/707,146 US7739530B2 (en) | 2006-08-04 | 2007-02-16 | Method and program for generating execution code for performing parallel processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006213342A JP4231516B2 (ja) | 2006-08-04 | 2006-08-04 | 実行コードの生成方法及びプログラム |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008040734A JP2008040734A (ja) | 2008-02-21 |
JP4231516B2 true JP4231516B2 (ja) | 2009-03-04 |
Family
ID=39030670
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006213342A Expired - Fee Related JP4231516B2 (ja) | 2006-08-04 | 2006-08-04 | 実行コードの生成方法及びプログラム |
Country Status (2)
Country | Link |
---|---|
US (1) | US7739530B2 (ja) |
JP (1) | JP4231516B2 (ja) |
Families Citing this family (28)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008129786A1 (ja) * | 2007-04-09 | 2008-10-30 | Panasonic Corporation | マルチプロセッサ制御装置、その制御方法および集積回路 |
WO2009037731A1 (ja) * | 2007-09-21 | 2009-03-26 | Fujitsu Limited | 翻訳装置と翻訳方法および翻訳プログラムとプロセッサコアの制御方法およびプロセッサ |
JP4339907B2 (ja) * | 2007-10-24 | 2009-10-07 | 株式会社日立製作所 | マルチプロセッサ向け最適コード生成方法及びコンパイル装置 |
US8312442B2 (en) * | 2008-12-10 | 2012-11-13 | Oracle America, Inc. | Method and system for interprocedural prefetching |
JP2010231306A (ja) * | 2009-03-26 | 2010-10-14 | Nec Corp | コンピュータシステム、ハードウェアリソース制御方法及びそのプログラム |
KR101155202B1 (ko) * | 2009-12-24 | 2012-06-13 | 포항공과대학교 산학협력단 | 멀티 코어 프로세서의 전력 관리 방법, 멀티 코어 프로세서의 전력 관리 방법이 기록된 기록매체 및 이를 실행하는 멀티 코어 프로세서 시스템 |
JP5574816B2 (ja) * | 2010-05-14 | 2014-08-20 | キヤノン株式会社 | データ処理装置及びデータ処理方法 |
JP5618670B2 (ja) | 2010-07-21 | 2014-11-05 | キヤノン株式会社 | データ処理装置及びその制御方法 |
US8943334B2 (en) * | 2010-09-23 | 2015-01-27 | Intel Corporation | Providing per core voltage and frequency control |
WO2012105000A1 (ja) * | 2011-02-01 | 2012-08-09 | 富士通株式会社 | プログラム実行方法 |
JP5794010B2 (ja) * | 2011-07-19 | 2015-10-14 | 富士通株式会社 | 情報処理装置、制御プログラムおよび制御方法 |
US8799693B2 (en) * | 2011-09-20 | 2014-08-05 | Qualcomm Incorporated | Dynamic power optimization for computing devices |
US9098309B2 (en) | 2011-09-23 | 2015-08-04 | Qualcomm Incorporated | Power consumption optimized translation of object code partitioned for hardware component based on identified operations |
GB2503743B (en) * | 2012-07-06 | 2015-08-19 | Samsung Electronics Co Ltd | Processing unit power management |
JP6042170B2 (ja) * | 2012-10-19 | 2016-12-14 | ルネサスエレクトロニクス株式会社 | キャッシュ制御装置及びキャッシュ制御方法 |
CN103853307A (zh) * | 2012-12-04 | 2014-06-11 | 鸿富锦精密工业(深圳)有限公司 | 电子装置及降低处理器系统功耗的方法 |
US10133557B1 (en) * | 2013-01-11 | 2018-11-20 | Mentor Graphics Corporation | Modifying code to reduce redundant or unnecessary power usage |
US9594560B2 (en) * | 2013-09-27 | 2017-03-14 | Intel Corporation | Estimating scalability value for a specific domain of a multicore processor based on active state residency of the domain, stall duration of the domain, memory bandwidth of the domain, and a plurality of coefficients based on a workload to execute on the domain |
US9829957B2 (en) * | 2014-03-26 | 2017-11-28 | Intel Corporation | Performance scalability prediction |
KR101860248B1 (ko) * | 2014-03-27 | 2018-05-21 | 인텔 코포레이션 | 그래픽 처리 유닛 주파수의 동적 조절을 지원하는 방법 및 장치 |
US10180828B2 (en) * | 2014-04-29 | 2019-01-15 | Significs And Elements, Llc | Systems and methods for power optimization of processors |
US10248180B2 (en) | 2014-10-16 | 2019-04-02 | Futurewei Technologies, Inc. | Fast SMP/ASMP mode-switching hardware apparatus for a low-cost low-power high performance multiple processor system |
US10928882B2 (en) * | 2014-10-16 | 2021-02-23 | Futurewei Technologies, Inc. | Low cost, low power high performance SMP/ASMP multiple-processor system |
JP6439623B2 (ja) | 2015-08-05 | 2018-12-19 | 富士通株式会社 | 計算機、動作周波数決定プログラム及び動作周波数決定方法 |
KR101668564B1 (ko) * | 2015-09-02 | 2016-10-21 | 충북대학교 산학협력단 | 소프트웨어 코드 리팩토링 방법 및 이를 기록한 기록매체 |
JP7230719B2 (ja) * | 2019-07-19 | 2023-03-01 | 富士通株式会社 | 情報処理装置及び情報処理方法 |
JP7436192B2 (ja) | 2019-12-05 | 2024-02-21 | ファナック株式会社 | 制御装置及び産業機械 |
US20230141385A1 (en) | 2020-06-08 | 2023-05-11 | Mitsubishi Electric Corporation | Information processing system and information processing system control method |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030014742A1 (en) * | 2001-07-09 | 2003-01-16 | Sasken Communication Technologies Limited | Technique for compiling computer code to reduce energy consumption while executing the code |
JP4131909B2 (ja) | 2001-07-26 | 2008-08-13 | 株式会社東芝 | コンパイル方法 |
US6795781B2 (en) * | 2002-06-27 | 2004-09-21 | Intel Corporation | Method and apparatus for compiler assisted power management |
US7185215B2 (en) * | 2003-02-24 | 2007-02-27 | International Business Machines Corporation | Machine code builder derived power consumption reduction |
US7334143B2 (en) * | 2004-04-19 | 2008-02-19 | Hewlett-Packard Development Company, L.P. | Computer power conservation apparatus and method that enables less speculative execution during light processor load based on a branch confidence threshold value |
WO2006024325A1 (en) * | 2004-08-31 | 2006-03-09 | Freescale Semiconductor, Inc. | Method for estimating power consumption |
US7386739B2 (en) * | 2005-05-03 | 2008-06-10 | International Business Machines Corporation | Scheduling processor voltages and frequencies based on performance prediction and power constraints |
KR100806274B1 (ko) * | 2005-12-06 | 2008-02-22 | 한국전자통신연구원 | 멀티 쓰레디드 프로세서 기반의 병렬 시스템을 위한 적응형실행 방법 |
US7861068B2 (en) * | 2006-03-07 | 2010-12-28 | Intel Corporation | Method and apparatus for using dynamic workload characteristics to control CPU frequency and voltage scaling |
US9582060B2 (en) * | 2006-08-31 | 2017-02-28 | Advanced Silicon Technologies Llc | Battery-powered device with reduced power consumption based on an application profile data |
US7853812B2 (en) * | 2007-02-07 | 2010-12-14 | International Business Machines Corporation | Reducing power usage in a software application |
-
2006
- 2006-08-04 JP JP2006213342A patent/JP4231516B2/ja not_active Expired - Fee Related
-
2007
- 2007-02-16 US US11/707,146 patent/US7739530B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
US7739530B2 (en) | 2010-06-15 |
JP2008040734A (ja) | 2008-02-21 |
US20080034236A1 (en) | 2008-02-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4231516B2 (ja) | 実行コードの生成方法及びプログラム | |
US8296746B2 (en) | Optimum code generation method and compiler device for multiprocessor | |
US10469397B2 (en) | Processors and methods with configurable network-based dataflow operator circuits | |
US10915471B2 (en) | Apparatuses, methods, and systems for memory interface circuit allocation in a configurable spatial accelerator | |
US10380063B2 (en) | Processors, methods, and systems with a configurable spatial accelerator having a sequencer dataflow operator | |
US10416999B2 (en) | Processors, methods, and systems with a configurable spatial accelerator | |
US10445451B2 (en) | Processors, methods, and systems for a configurable spatial accelerator with performance, correctness, and power reduction features | |
US10558575B2 (en) | Processors, methods, and systems with a configurable spatial accelerator | |
US10387319B2 (en) | Processors, methods, and systems for a configurable spatial accelerator with memory system performance, power reduction, and atomics support features | |
US20190303297A1 (en) | Apparatus, methods, and systems for remote memory access in a configurable spatial accelerator | |
US20190101952A1 (en) | Processors and methods for configurable clock gating in a spatial array | |
US5966534A (en) | Method for compiling high level programming languages into an integrated processor with reconfigurable logic | |
US20190095383A1 (en) | Processors, methods, and systems for debugging a configurable spatial accelerator | |
US20100235611A1 (en) | Compiler, compile method, and processor core control method and processor | |
US20140304490A1 (en) | Information processing device and information processing method | |
US20060248520A1 (en) | Program conversion device and program conversion method | |
US20220100680A1 (en) | Apparatuses, methods, and systems for a configurable accelerator having dataflow execution circuits | |
WO2013112282A1 (en) | Method and apparatus for register spill minimization | |
US8732679B2 (en) | Loop transformation for computer compiler optimization | |
Araujo et al. | Challenges in code generation for embedded processors | |
CN110852930B (zh) | 一种基于OpenCL的FPGA图处理加速方法和系统 | |
CN104346132A (zh) | 应用于智能卡虚拟机运行的控制装置及智能卡虚拟机 | |
US20230116546A1 (en) | Method for compilation, electronic device and storage medium | |
JP4158458B2 (ja) | 情報処理装置、その情報処理方法 | |
EP4227795A1 (en) | A computer-implemented method and a computer-readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20071113 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080520 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080715 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080812 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20081014 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20081202 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20081205 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4231516 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111212 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111212 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121212 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131212 Year of fee payment: 5 |
|
LAPS | Cancellation because of no payment of annual fees |